Really messing around with trivia, it's not good yet

It's really not clear how to track it and how to compose it with
groups yet. Really very difficult.
This commit is contained in:
John Doty 2024-09-14 17:14:07 -07:00
parent 71b59302fa
commit d5ccd5b147
4 changed files with 131 additions and 30 deletions

View file

@ -543,12 +543,12 @@ class Harness:
case wadler.Text(start, end):
if self.source is not None:
append(f"< {self.source[start:end]}")
append(f"< {repr(self.source[start:end])}")
else:
append(f"< ??? {start}:{end}")
case wadler.Literal(text):
append(f"' {text}")
append(f"literal {repr(text)}")
case wadler.Group():
append("group")