Move the parse function to the grammar.

This commit is contained in:
Dave Halter
2017-05-22 14:06:40 -04:00
parent 3a0cd6d377
commit 7d3438c94d
4 changed files with 99 additions and 97 deletions

View File

@@ -10,7 +10,6 @@ from textwrap import dedent
from parso._compatibility import py_version
from parso import load_python_grammar
from parso.python import parse as _parse
from parso import ParserSyntaxError
import pytest
@@ -18,7 +17,7 @@ import pytest
def parse(code, version='3.4'):
code = dedent(code) + "\n\n"
grammar = load_python_grammar(version=version)
return _parse(code, grammar=grammar, error_recovery=False)
return grammar.parse(code, error_recovery=False)
def test_formfeed():