reorganization: Finish moving parsing and AST

This commit is contained in:
James Westman 2022-01-26 22:37:51 -06:00
parent 8f9de81e24
commit ee5f32622f
27 changed files with 737 additions and 719 deletions

View file

@ -530,5 +530,7 @@ def to_parse_node(value) -> ParseNode:
return Sequence(*value)
elif isinstance(value, type) and hasattr(value, "grammar"):
return Group(value, getattr(value, "grammar"))
else:
elif isinstance(value, ParseNode):
return value
else:
raise CompilerBugError()