Try to use line numbers instead of offsets in the fast parser.

This commit is contained in:
Dave Halter
2016-07-11 08:56:30 +02:00
parent 3ad67a4ec7
commit 72634a94b8
2 changed files with 34 additions and 19 deletions

View File

@@ -480,3 +480,14 @@ def test_round_trip():
f = FastParser(load_grammar(), u(source))
assert f.get_parsed_node().get_code() == source
def test_parentheses_in_string():
code = dedent('''
def x():
'('
import abc
abc.''')
check_fp(code, 2, 1, 1)