1
0
forked from VimPlug/jedi

Remove a comprehension hack in the parser that would have made the diff parsers world hell.

This commit is contained in:
Dave Halter
2016-09-22 18:26:09 +02:00
parent c161e33119
commit e371b670f5
4 changed files with 15 additions and 8 deletions

View File

@@ -193,11 +193,6 @@ class Parser(object):
arr = self._scope_names_stack[-1].setdefault(n.value, [])
arr.append(n)
new_node.names_dict = scope_names
elif isinstance(new_node, pt.CompFor):
# The name definitions of comprehenions shouldn't be part of the
# current scope. They are part of the comprehension scope.
for n in new_node.get_defined_names():
self._scope_names_stack[-1][n.value].remove(n)
return new_node
def convert_leaf(self, grammar, type, value, prefix, start_pos):