mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-23 01:59:02 +08:00
Remove get_parsed_node from the parser as well.
This commit is contained in:
@@ -85,10 +85,6 @@ class Parser(object):
|
|||||||
del self.pgen_parser
|
del self.pgen_parser
|
||||||
return self._parsed
|
return self._parsed
|
||||||
|
|
||||||
def get_parsed_node(self):
|
|
||||||
# TODO remove in favor of get_root_node
|
|
||||||
return self._parsed
|
|
||||||
|
|
||||||
def get_root_node(self):
|
def get_root_node(self):
|
||||||
return self._parsed
|
return self._parsed
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ class IntegrationTestCase(object):
|
|||||||
string = match.group(0)
|
string = match.group(0)
|
||||||
parser = Parser(load_grammar(), string, start_symbol='eval_input')
|
parser = Parser(load_grammar(), string, start_symbol='eval_input')
|
||||||
parser.get_root_node().move(self.line_nr)
|
parser.get_root_node().move(self.line_nr)
|
||||||
element = parser.get_parsed_node()
|
element = parser.get_root_node()
|
||||||
module_context = script._get_module()
|
module_context = script._get_module()
|
||||||
# The context shouldn't matter for the test results.
|
# The context shouldn't matter for the test results.
|
||||||
user_context = get_user_scope(module_context, (self.line_nr, 0))
|
user_context = get_user_scope(module_context, (self.line_nr, 0))
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ def test_round_trip():
|
|||||||
func''')
|
func''')
|
||||||
|
|
||||||
f = FastParser(load_grammar(), u(source))
|
f = FastParser(load_grammar(), u(source))
|
||||||
assert f.get_parsed_node().get_code() == source
|
assert f.get_root_node().get_code() == source
|
||||||
|
|
||||||
|
|
||||||
def test_parentheses_in_string():
|
def test_parentheses_in_string():
|
||||||
|
|||||||
Reference in New Issue
Block a user