1
0
forked from VimPlug/jedi

Start using the correct parser for each environment

This commit is contained in:
Dave Halter
2017-12-19 19:19:35 +01:00
parent a9ebd92c20
commit 96a67f9a4c
5 changed files with 10 additions and 11 deletions

View File

@@ -115,7 +115,7 @@ class Script(object):
# Load the Python grammar of the current interpreter.
self._grammar = parso.load_grammar()
project = Project(sys_path=sys_path)
self._evaluator = Evaluator(self._grammar, project, environment)
self._evaluator = Evaluator(project, environment)
project.add_script_path(self.path)
debug.speed('init')

View File

@@ -28,7 +28,7 @@ class _BaseEnvironment(object):
return Project(self.get_sys_path())
@memoize_method
def get_parser(self):
def get_grammar(self):
version_string = '%s.%s' % (self.version_info.major, self.version_info.minor)
return parso.load_grammar(version=version_string)