mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-07 05:14:29 +08:00
Move the iter_errors and normalizer methods to grammar.py.
This commit is contained in:
@@ -13,7 +13,7 @@ from .failing_examples import FAILING_EXAMPLES, indent, build_nested
|
||||
def _get_error_list(code, version=None):
|
||||
grammar = parso.load_grammar(version=version)
|
||||
tree = grammar.parse(code)
|
||||
return list(tree._iter_errors(grammar))
|
||||
return list(grammar.iter_errors(tree))
|
||||
|
||||
def assert_comparison(code, error_code, positions):
|
||||
errors = [(error.start_pos, error.code) for error in _get_error_list(code)]
|
||||
|
||||
Reference in New Issue
Block a user