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

@@ -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]