mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Minor code cleanup
This commit is contained in:
parent
4d62df0068
commit
5b50090b65
3 changed files with 11 additions and 23 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue