1
0
forked from VimPlug/jedi

Start actual testing of the new parser.

This commit is contained in:
Dave Halter
2014-10-09 13:16:28 +02:00
parent daee273a08
commit 68d23840bb
3 changed files with 14 additions and 4 deletions

View File

@@ -126,6 +126,9 @@ class Node(Base):
if sys.version_info > (3, 0):
__str__ = __unicode__
def get_code(self):
return str(self)
@property
def prefix(self):
"""
@@ -186,7 +189,7 @@ def convert(grammar, raw_node):
if type == tokenize.NAME:
return pr.Name(value, start_pos, prefix)
elif type in (tokenize.STRING, tokenize.NUMBER):
return pr.Name(value, start_pos, prefix)
return pr.Literal(value, start_pos, prefix)
elif type in (tokenize.NEWLINE, tokenize.ENDMARKER):
return pr.Whitespace(value, start_pos, prefix)
else: