From d2d165267d9ccaa7e661aaf1cc8124d2b2329838 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 31 Mar 2017 21:41:36 +0200 Subject: [PATCH] Remove unused get_root_node on the parser. --- jedi/parser/python/parser.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/jedi/parser/python/parser.py b/jedi/parser/python/parser.py index 590a27a8..4627a237 100644 --- a/jedi/parser/python/parser.py +++ b/jedi/parser/python/parser.py @@ -51,12 +51,6 @@ class Parser(BaseParser): super(Parser, self).__init__(grammar, start_symbol, error_recovery=error_recovery) self.source = source - self._added_newline = False - # The Python grammar needs a newline at the end of each statement. - #if not source.endswith('\n') and start_symbol == 'file_input': - # source += '\n' - # self._added_newline = True - self.new_code = source self.syntax_errors = [] @@ -85,19 +79,14 @@ class Parser(BaseParser): if self._start_symbol == 'file_input' != node.type: # If there's only one statement, we get back a non-module. That's # not what we want, we want a module, so we add it here: - self._parsed = node = self.convert_node( + node = self.convert_node( self._grammar, self._grammar.symbol2number['file_input'], [node] ) - #if self._added_newline: - # _remove_last_newline(node) return node - def get_root_node(self): - return self._parsed - def convert_node(self, grammar, type, children): """ Convert raw node information to a PythonBaseNode instance.