-
-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(types): add some types based on MonkeyType
Signed-off-by: Henry Schreiner <[email protected]>
- Loading branch information
Showing
3 changed files
with
74 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,9 @@ | |
# Author: Erez Shinan (2017) | ||
# Email : [email protected] | ||
from copy import deepcopy, copy | ||
from typing import Dict, Any | ||
from ..lexer import Token | ||
from ..utils import Serialize | ||
from ..utils import Serialize, SerializeMemoizer | ||
|
||
from .lalr_analysis import LALR_Analyzer, Shift, Reduce, IntParseTable | ||
from .lalr_interactive_parser import InteractiveParser | ||
|
@@ -29,7 +30,7 @@ def deserialize(cls, data, memo, callbacks, debug=False): | |
inst.parser = _Parser(inst._parse_table, callbacks, debug) | ||
return inst | ||
|
||
def serialize(self, memo): | ||
def serialize(self, memo = None) -> Dict[str, Any]: | ||
return self._parse_table.serialize(memo) | ||
|
||
def parse_interactive(self, lexer, start): | ||
|
Oops, something went wrong.