1
0
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:
Dave Halter
2017-03-22 18:32:49 +01:00
parent c41bee4253
commit 26cce4d078
10 changed files with 41 additions and 34 deletions

View File

@@ -221,10 +221,10 @@ def _get_paths_from_buildout_script(evaluator, buildout_script):
return
p = ParserWithRecovery(evaluator.grammar, source, buildout_script)
save_parser(buildout_script, p)
save_parser(evaluator.grammar, buildout_script, p)
return p.get_root_node()
cached = load_parser(buildout_script)
cached = load_parser(evaluator.grammar, buildout_script)
module_node = cached and cached.module or load(buildout_script)
if module_node is None:
return