Commit b6e34822 authored by di68kap's avatar di68kap
Browse files

- MLW Erweiterung

parent cfb56e29
......@@ -556,7 +556,7 @@ class Grammar:
for entry, parser in cdict.items():
if isinstance(parser, Parser) and sane_parser_name(entry):
if isinstance(parser, Forward):
if not cast(Forward, parser)
if not cast(Forward, parser)
cast(Forward, parser) = entry
else: # if not = entry
......@@ -1750,6 +1750,12 @@ class Synonym(UnaryOperator):
def __repr__(self):
return or self.parser.repr
def __str__(self):
return super().__str__()
def repr(self) -> str:
return super().repr
class Forward(Parser):
......@@ -1811,7 +1817,7 @@ class Forward(Parser):
def repr(self) -> str:
"""Returns the parser's name if it has a name and repr()"""
"""Returns the parser's name if it has a name or repr(self) if not."""
return if else repr(self)
def set(self, parser: Parser):
Supports Markdown
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