Fixed #30 : Add variable support in BNF concept definition

Fixed #31 : Add regex support in BNF Concept
Fixed #33 : Do not memorize object during restore
This commit is contained in:
2021-02-24 17:23:03 +01:00
parent cac2dad17f
commit 646c428edb
32 changed files with 2107 additions and 360 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
import json
import core.utils
from core.global_symbols import NotInit, NotFound, Removed
from core.global_symbols import NotInit, NotFound, Removed, NoFirstToken
from sheerkapickle import tags, utils, handlers
@@ -54,6 +54,8 @@ class SheerkaUnpickler:
instance = NotFound
elif obj[tags.CUSTOM] == Removed.value:
instance = Removed
elif obj[tags.CUSTOM] == NoFirstToken.value:
instance = NoFirstToken
else:
raise KeyError(f"unknown {obj[tags.CUSTOM]}")