1
0
forked from VimPlug/jedi

Get a first local test passing.

This commit is contained in:
Dave Halter
2014-10-10 12:07:08 +02:00
parent 3bf1fec568
commit 54c91b1509
3 changed files with 5 additions and 12 deletions

View File

@@ -126,9 +126,8 @@ class Evaluator(object):
:param stmt: A `pr.ExprStmt`.
"""
debug.dbg('eval_statement %s (%s)', stmt, seek_name)
expression_list = stmt.expression_list()
if isinstance(stmt, FakeStatement):
return expression_list # Already contains the results.
return stmt.children # Already contains the results.
result = self.eval_element(stmt.children[0])

View File

@@ -310,7 +310,8 @@ class FakeImport(pr.Import):
class FakeName(pr.Name):
def __init__(self, name_str, parent=None, start_pos=(0, 0)):
super(FakeName, self).__init__(FakeSubModule, name_str, parent, start_pos)
super(FakeName, self).__init__(name_str, start_pos)
self.parent = parent
def get_definition(self):
return self.parent

View File

@@ -171,7 +171,7 @@ class Base(object):
class _Leaf(Base):
__slots__ = ('value', 'parent', 'start_pos', 'prefix')
def __init__(self, value, start_pos, prefix):
def __init__(self, value, start_pos, prefix=''):
self.value = value
self.start_pos = start_pos
self.prefix = prefix
@@ -1003,14 +1003,7 @@ class Statement(Simple, DocstringMixin):
would result in ``[(Name(x), '='), (Array([Name(y), Name(z)]), '=')]``.
"""
return self._assignment_details
@cache.underscore_memoization
def expression_list(self):
"""
Parse a statement.
"""
return self.children
return []
def set_expression_list(self, lst):
"""It's necessary for some "hacks" to change the expression_list."""