mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
The fast parser had some splitting issues.
This commit is contained in:
@@ -353,6 +353,9 @@ class FastParser(use_metaclass(CachedFastParser)):
|
||||
- l.count(')') - l.count(']') - l.count('}')))
|
||||
|
||||
current_lines.append(l)
|
||||
|
||||
if previous_line is not None:
|
||||
current_lines.append(previous_line)
|
||||
if current_lines:
|
||||
yield gen_part()
|
||||
|
||||
|
||||
@@ -75,6 +75,9 @@ def test_split_parts():
|
||||
test('a\n\n', 'def b(): pass\n', 'c\n')
|
||||
test('a\n', 'def b():\n pass\n', 'c\n')
|
||||
|
||||
test('from x\\\n')
|
||||
test('a\n\\\n')
|
||||
|
||||
|
||||
def check_fp(src, number_parsers_used, number_of_splits=None, number_of_misses=0):
|
||||
if number_of_splits is None:
|
||||
|
||||
Reference in New Issue
Block a user