1
0
forked from VimPlug/jedi

Fix a few issues caused by the refactoring.

This commit is contained in:
Dave Halter
2016-05-29 19:49:35 +02:00
parent feef45f4bb
commit daa68b66ad
8 changed files with 60 additions and 33 deletions
+2 -1
View File
@@ -26,7 +26,8 @@ def deep_ast_copy(obj, parent=None, new_elements=None):
new_children = []
for child in obj.children:
typ = child.type
if typ in ('whitespace', 'operator', 'keyword', 'number', 'string'):
if typ in ('whitespace', 'operator', 'keyword', 'number', 'string',
'indent', 'dedent'):
# At the moment we're not actually copying those primitive
# elements, because there's really no need to. The parents are
# obviously wrong, but that's not an issue.
+1 -1
View File
@@ -33,7 +33,7 @@ def _evaluate_for_annotation(evaluator, annotation):
if (isinstance(definition, CompiledObject) and
isinstance(definition.obj, str)):
try:
p = Parser(load_grammar(), definition.obj, start='eval_input')
p = Parser(load_grammar(), definition.obj, start_symbol='eval_input')
element = p.get_parsed_node()
except ParseError:
debug.warning('Annotation not parsed: %s' % definition.obj)