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:
1 parent
c41bee4253
commit
26cce4d078
10 files changed
+41
-34
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user