Refactored parsers to introduce priority
This commit is contained in:
@@ -227,7 +227,10 @@ class ParserResultConcept(Concept):
|
||||
self.set_prop("try_parsed", try_parsed) # in case of error, what was found before the error
|
||||
|
||||
def __repr__(self):
|
||||
return f"ParserResult({self.body})"
|
||||
text = f"ParserResult(parser={self.props['parser'].value}"
|
||||
source = self.props['source'].value
|
||||
text += f", source='{source}')" if source else f", body='{self.body}')"
|
||||
return text
|
||||
|
||||
def __eq__(self, other):
|
||||
if not isinstance(other, ParserResultConcept):
|
||||
|
||||
Reference in New Issue
Block a user