The parser cache in RAM has now grammar versioning.

This commit is contained in:
Dave Halter committed 2017-05-26 12:48:59 -04:00
1 parent f997b91a12
commit dafffdc9b4
4 files changed
+25 -28

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@ class Differ(object):
def initialize(self, code):
logging.debug('differ: initialize')
self.lines = splitlines(code, keepends=True)
cache.parser_cache.pop(None, None)
cache.parser_cache[self.grammar._hashed].pop(None, None)
self.module = parse(code, diff_cache=True, cache=True)
return self.module