diff --git a/gtkblueprinttool/parser.py b/gtkblueprinttool/parser.py index 4559fd6..9ac3fdf 100644 --- a/gtkblueprinttool/parser.py +++ b/gtkblueprinttool/parser.py @@ -74,10 +74,10 @@ def parse(tokens) -> T.Tuple[ast.UI, T.Optional[MultipleErrors]]: UseIdent("bind_source").expected("the ID of a source object to bind from"), Op("."), UseIdent("bind_property").expected("a property name to bind from"), - AnyOf( + ZeroOrMore(AnyOf( Sequence(Keyword("sync-create"), UseLiteral("sync_create", True)), Sequence(Keyword("after"), UseLiteral("after", True)), - ), + )), ) ) diff --git a/tests/samples/binding.blp b/tests/samples/binding.blp index e4b4a88..af478fb 100644 --- a/tests/samples/binding.blp +++ b/tests/samples/binding.blp @@ -2,6 +2,8 @@ using Gtk 4.0; Box { visible: bind box2.visible sync-create; + orientation: bind box2.orientation; } -Box box2 {} +Box box2 { +} diff --git a/tests/samples/binding.ui b/tests/samples/binding.ui index 7d20e8c..14a74ac 100644 --- a/tests/samples/binding.ui +++ b/tests/samples/binding.ui @@ -3,6 +3,7 @@ +