Remove the remove_newline hack and build that stuff into error recovery instead.

Tests are passing except for diff parser tests.
This commit is contained in:
Dave Halter
2017-05-31 21:24:24 +02:00
parent b367058af6
commit 814b16cc6c
10 changed files with 73 additions and 96 deletions

View File

@@ -81,7 +81,7 @@ def test_incomplete_list_comprehension():
# parser only valid statements generate one.
children = parse('(1 for def').children
assert [c.type for c in children] == \
['error_node', 'error_node', 'newline', 'endmarker']
['error_node', 'error_node', 'endmarker']
def test_newline_positions():
@@ -153,7 +153,7 @@ def test_python2_octal():
def test_python3_octal():
module = parse('0o660')
if py_version >= 30:
assert module.children[0].children[0].type == 'number'
assert module.children[0].type == 'number'
else:
assert module.children[0].type == 'error_node'