From 43d4a8a83456c256a8418b0c7b1cbc62dd8f818a Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sun, 24 Jun 2018 23:45:18 +0200 Subject: [PATCH] Don't use a function that doesn't work --- parso/python/parser.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/parso/python/parser.py b/parso/python/parser.py index cf4298f..a11cf70 100644 --- a/parso/python/parser.py +++ b/parso/python/parser.py @@ -1,7 +1,6 @@ from parso.python import tree from parso.python.token import PythonTokenTypes from parso.parser import BaseParser -from parso.pgen2.parse import token_to_ilabel NAME = PythonTokenTypes.NAME @@ -163,9 +162,8 @@ class Parser(BaseParser): # end of a file, we have to recover even if the user doesn't want # error recovery. if stack[-1].dfa.from_rule == 'simple_stmt': - ilabel = token_to_ilabel(pgen_grammar, PythonTokenTypes.NEWLINE, value) try: - plan = stack[-1].dfa.ilabel_to_plan[ilabel] + plan = stack[-1].dfa.ilabel_to_plan[PythonTokenTypes.NEWLINE] except KeyError: pass else: