Commit b6e34822 authored by di68kap's avatar di68kap
Browse files

- MLW Erweiterung

parent cfb56e29
...@@ -1750,6 +1750,12 @@ class Synonym(UnaryOperator): ...@@ -1750,6 +1750,12 @@ class Synonym(UnaryOperator):
def __repr__(self): def __repr__(self):
return self.name or self.parser.repr return self.name or self.parser.repr
def __str__(self):
return super().__str__()
def repr(self) -> str:
return super().repr
class Forward(Parser): class Forward(Parser):
r""" r"""
...@@ -1811,7 +1817,7 @@ class Forward(Parser): ...@@ -1811,7 +1817,7 @@ class Forward(Parser):
@property @property
def repr(self) -> str: 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 self.parser.name if self.parser.name else repr(self) return self.parser.name if self.parser.name else repr(self)
def set(self, parser: Parser): def set(self, parser: Parser):
......
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