05.11., 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 220512ba authored by eckhart's avatar eckhart

- ebnf.py: Type errors corrected

parent a33f26d0
......@@ -313,7 +313,8 @@ WHITESPACE_TYPES = {'horizontal': r'[\t ]*', # default: horizontal
'vertical': r'\s*'}
ReprType = Union[str, unrepr] # Representation of Python code
# Representation of Python code or, rather, something that will be output as Python code
ReprType = Union[str, unrepr]
class EBNFDirectives:
......@@ -349,6 +350,8 @@ class EBNFDirectives:
is the point of reentry for the parser after a parser
has error occurred.
"""
__slots__ = ['whitespace', 'comment', 'literalws', 'tokens', 'filter', 'error', 'resume']
def __init__(self):
self.whitespace = WHITESPACE_TYPES['vertical'] # type: str
self.comment = '' # type: str
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment