forked from VimPlug/jedi
Add the grammar as an argument to saving the parser.
This makes collisions of different grammars when loading from the cache impossible.
This commit is contained in:
@@ -134,7 +134,7 @@ class Script(object):
|
||||
@cache.memoize_method
|
||||
def _get_module_node(self):
|
||||
parser = FastParser(self._grammar, self._source, self.path)
|
||||
save_parser(self.path, parser, pickling=False)
|
||||
save_parser(self._grammar, self.path, parser, pickling=False)
|
||||
|
||||
return parser.get_root_node()
|
||||
|
||||
|
||||
@@ -391,7 +391,7 @@ class BaseDefinition(object):
|
||||
return ''
|
||||
|
||||
path = self._name.get_root_context().py__file__()
|
||||
parser = load_parser(path)
|
||||
parser = load_parser(self._evaluator.grammar, path)
|
||||
lines = common.splitlines(parser.source)
|
||||
|
||||
line_nr = self._name.start_pos[0]
|
||||
|
||||
Reference in New Issue
Block a user