Fix error handling on keyword blocks

Some blocks (menu, layout, etc) would emit an error if they didn't find
an opening brace, which would fail if, for example, you had an object
with ID "menu" and tried to use it as a property value.
This commit is contained in:
James Westman 2021-11-24 21:40:46 -06:00
parent 097c7df326
commit 0afa62654d
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
3 changed files with 3 additions and 3 deletions

View file

@ -164,7 +164,7 @@ a11y = Group(
A11y, A11y,
Sequence( Sequence(
Keyword("accessibility", True), Keyword("accessibility", True),
OpenBlock().expected("`{`"), OpenBlock(),
Until(a11y_prop, CloseBlock()), Until(a11y_prop, CloseBlock()),
) )
) )

View file

@ -62,7 +62,7 @@ layout = Group(
Layout, Layout,
Sequence( Sequence(
Keyword("layout", True), Keyword("layout", True),
OpenBlock().expected("`{`"), OpenBlock(),
Until(layout_prop, CloseBlock()), Until(layout_prop, CloseBlock()),
) )
) )

View file

@ -112,7 +112,7 @@ menu_item_shorthand = Group(
) )
menu_contents.children = [ menu_contents.children = [
OpenBlock().expected("`{`"), OpenBlock(),
Until(AnyOf( Until(AnyOf(
menu_section, menu_section,
menu_submenu, menu_submenu,