mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-07 13:24:39 +08:00
Fix tokenizer: backslashes sometimes led to newline token generation
This commit is contained in:
@@ -40,7 +40,7 @@ _python_reserved_strings = tuple(
|
||||
)
|
||||
_random_python_fragments = _python_reserved_strings + (
|
||||
' ', '\t', '\n', '\r', '\f', 'f"', 'F"""', "fr'", "RF'''", '"', '"""', "'",
|
||||
"'''", ';', ' some_random_word ', '\\'
|
||||
"'''", ';', ' some_random_word ', '\\', '#',
|
||||
)
|
||||
|
||||
|
||||
@@ -172,6 +172,7 @@ class FileTests:
|
||||
code = f.read()
|
||||
self._code_lines = split_lines(code, keepends=True)
|
||||
self._test_count = test_count
|
||||
self._code_lines = self._code_lines[:30]
|
||||
self._change_count = change_count
|
||||
|
||||
with open(file_path) as f:
|
||||
|
||||
Reference in New Issue
Block a user