mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-16 21:44:56 +08:00
Fix some endmarker prefix issues in the fast parser.
This commit is contained in:
@@ -252,7 +252,7 @@ class Parser(object):
|
||||
#print('err', token.tok_name[typ], repr(value), start_pos, len(stack), index)
|
||||
self._stack_removal(grammar, stack, index + 1, value, start_pos)
|
||||
if typ == token.INDENT:
|
||||
# For every deleted INDENT we got to delete a DEDENT as well.
|
||||
# For every deleted INDENT we have to delete a DEDENT as well.
|
||||
# Otherwise the parser will get into trouble and DEDENT too early.
|
||||
self._omit_dedent += 1
|
||||
|
||||
@@ -307,7 +307,7 @@ class Parser(object):
|
||||
|
||||
def _tokenize(self, tokenizer):
|
||||
for typ, value, start_pos, prefix in tokenizer:
|
||||
# print(token.tok_name[typ], repr(value), start_pos, repr(prefix))
|
||||
print(token.tok_name[typ], repr(value), start_pos, repr(prefix))
|
||||
if self._omit_dedent and typ == token.DEDENT:
|
||||
self._omit_dedent -= 1
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user