Minor code cleanup

This commit is contained in:
James Westman 2023-05-02 09:28:42 -05:00
parent 4d62df0068
commit 5b50090b65
3 changed files with 11 additions and 23 deletions

View file

@ -25,6 +25,7 @@ from .values import Value
class LayoutProperty(AstNode):
grammar = Statement(UseIdent("name"), ":", Err(Value, "Expected a value"))
tag_name = "property"
@property
@ -48,17 +49,11 @@ class LayoutProperty(AstNode):
)
layout_prop = Group(
LayoutProperty,
Statement(UseIdent("name"), ":", Err(Value, "Expected a value")),
)
class ExtLayout(AstNode):
grammar = Sequence(
Keyword("layout"),
"{",
Until(layout_prop, "}"),
Until(LayoutProperty, "}"),
)
@validate("layout")