Add compilation tests

Added a set of test inputs and expected outputs, for regression testing.
This commit is contained in:
James Westman 2021-10-31 23:29:07 -05:00
parent 53ad4ec69d
commit 5f0eef5f2e
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
21 changed files with 241 additions and 9 deletions

View file

@ -30,7 +30,7 @@ class Menu(AstNode):
def emit_xml(self, xml: XmlEmitter):
xml.start_tag(self.tokens["tag"], id=self.tokens["id"])
for child in self.children:
child.emit_xml()
child.emit_xml(xml)
xml.end_tag()
@ -96,7 +96,7 @@ menu_item_shorthand = Group(
)),
Optional(Group(
MenuAttribute,
Sequence(UseLiteral("name", "verb-icon-name"), value),
Sequence(UseLiteral("name", "icon"), value),
)),
StmtEnd().expected("`;`"),
)