1
0
forked from VimPlug/jedi

Always create a module.

This commit is contained in:
Dave Halter
2014-10-23 16:27:16 +02:00
parent de4db11d25
commit 3bdd32ad87

View File

@@ -94,9 +94,10 @@ def convert(grammar, raw_node):
if type in grammar.number2symbol: if type in grammar.number2symbol:
# If there's exactly one child, return that child instead of # If there's exactly one child, return that child instead of
# creating a new node. # creating a new node.
# We still create expr_stmt though, because a lot of Jedi depends on # We still create expr_stmt and file_input though, because a lot of
# its logic. # Jedi depends on its logic.
if len(children) == 1 and type != python_symbols.expr_stmt: if len(children) == 1 and type not in (python_symbols.expr_stmt,
python_symbols.file_input):
return children[0] return children[0]
#print(raw_node, type_repr(type)) #print(raw_node, type_repr(type))
#import pdb; pdb.set_trace() #import pdb; pdb.set_trace()