mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Fix invalid test issues.
This commit is contained in:
@@ -214,12 +214,11 @@ class Parser(object):
|
|||||||
symbol = grammar.number2symbol[_type]
|
symbol = grammar.number2symbol[_type]
|
||||||
if symbol in ('file_input', 'suite'):
|
if symbol in ('file_input', 'suite'):
|
||||||
break
|
break
|
||||||
# No success finding a transition
|
|
||||||
#print('err', tokenize.tok_name[typ], repr(value), start_pos, len(stack), index)
|
#print('err', tokenize.tok_name[typ], repr(value), start_pos, len(stack), index)
|
||||||
self._stack_removal(grammar, stack, index + 1, value, start_pos)
|
self._stack_removal(grammar, stack, index + 1, value, start_pos)
|
||||||
# Those can always be new statements.
|
|
||||||
if value in ('import', 'from', 'class', 'def', 'try', 'while', 'return'):
|
if value in ('import', 'from', 'class', 'def', 'try', 'while', 'return'):
|
||||||
pass
|
# Those can always be new statements.
|
||||||
|
add_token_callback(typ, value, prefix, start_pos)
|
||||||
elif typ == tokenize.DEDENT:
|
elif typ == tokenize.DEDENT:
|
||||||
if symbol == 'suite':
|
if symbol == 'suite':
|
||||||
if len(nodes) > 2:
|
if len(nodes) > 2:
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ a[0]
|
|||||||
|
|
||||||
a = [a for a in [1,2]
|
a = [a for a in [1,2]
|
||||||
def break(): pass
|
def break(): pass
|
||||||
#? int()
|
#?
|
||||||
a[0]
|
a[0]
|
||||||
|
|
||||||
#? []
|
#? []
|
||||||
|
|||||||
Reference in New Issue
Block a user