diff --git a/docs/examples.rst b/docs/examples.rst index cd9cbb9..c187be5 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -211,7 +211,7 @@ Basic Usage .. code-block:: Gtk.Label { - styles: ["dim-label", "title"]; + styles: ["dim-label", "title"] } diff --git a/gtkblueprinttool/extensions/gtk_combo_box_text.py b/gtkblueprinttool/extensions/gtk_combo_box_text.py index dfb66e1..32e76ca 100644 --- a/gtkblueprinttool/extensions/gtk_combo_box_text.py +++ b/gtkblueprinttool/extensions/gtk_combo_box_text.py @@ -65,7 +65,7 @@ item = Group( items = Group( Items, - Statement( + Sequence( Keyword("items", True), OpenBracket(), Delimited( diff --git a/gtkblueprinttool/extensions/gtk_file_filter.py b/gtkblueprinttool/extensions/gtk_file_filter.py index 41c044d..f8548df 100644 --- a/gtkblueprinttool/extensions/gtk_file_filter.py +++ b/gtkblueprinttool/extensions/gtk_file_filter.py @@ -49,7 +49,7 @@ class FilterString(AstNode): def create_node(tag_name: str, singular: str): return Group( Filters, - Statement( + Sequence( Keyword(tag_name, True), UseLiteral("tag_name", tag_name), OpenBracket(), diff --git a/gtkblueprinttool/extensions/gtk_size_group.py b/gtkblueprinttool/extensions/gtk_size_group.py index e0ec42d..13c4b78 100644 --- a/gtkblueprinttool/extensions/gtk_size_group.py +++ b/gtkblueprinttool/extensions/gtk_size_group.py @@ -60,7 +60,7 @@ class Widget(AstNode): widgets = Group( Widgets, - Statement( + Sequence( Keyword("widgets", True), OpenBracket(), Delimited( diff --git a/gtkblueprinttool/extensions/gtk_string_list.py b/gtkblueprinttool/extensions/gtk_string_list.py index 1f6b68a..4eb5cdc 100644 --- a/gtkblueprinttool/extensions/gtk_string_list.py +++ b/gtkblueprinttool/extensions/gtk_string_list.py @@ -61,7 +61,7 @@ item = Group( strings = Group( Items, - Statement( + Sequence( Keyword("strings", True), OpenBracket(), Delimited( diff --git a/gtkblueprinttool/extensions/gtk_styles.py b/gtkblueprinttool/extensions/gtk_styles.py index 364c1fd..d487eb5 100644 --- a/gtkblueprinttool/extensions/gtk_styles.py +++ b/gtkblueprinttool/extensions/gtk_styles.py @@ -46,7 +46,7 @@ class StyleClass(AstNode): styles = Group( Styles, - Statement( + Sequence( Keyword("styles", True), OpenBracket(), Delimited( diff --git a/tests/sample_errors/filters_in_non_file_filter.blp b/tests/sample_errors/filters_in_non_file_filter.blp index 44e6d49..2c08e6f 100644 --- a/tests/sample_errors/filters_in_non_file_filter.blp +++ b/tests/sample_errors/filters_in_non_file_filter.blp @@ -1,7 +1,7 @@ using Gtk 4.0; Widget { - mime-types []; - patterns []; - suffixes []; + mime-types [] + patterns [] + suffixes [] } diff --git a/tests/sample_errors/filters_in_non_file_filter.err b/tests/sample_errors/filters_in_non_file_filter.err index 018503f..4bb0619 100644 --- a/tests/sample_errors/filters_in_non_file_filter.err +++ b/tests/sample_errors/filters_in_non_file_filter.err @@ -1,3 +1,3 @@ -4,3,14,Gtk.Widget is not a Gtk.FileFilter, so it doesn't have file filter properties -5,3,12,Gtk.Widget is not a Gtk.FileFilter, so it doesn't have file filter properties -6,3,12,Gtk.Widget is not a Gtk.FileFilter, so it doesn't have file filter properties +4,3,13,Gtk.Widget is not a Gtk.FileFilter, so it doesn't have file filter properties +5,3,11,Gtk.Widget is not a Gtk.FileFilter, so it doesn't have file filter properties +6,3,11,Gtk.Widget is not a Gtk.FileFilter, so it doesn't have file filter properties diff --git a/tests/sample_errors/obj_in_string_list.blp b/tests/sample_errors/obj_in_string_list.blp index 005fe68..18cac9e 100644 --- a/tests/sample_errors/obj_in_string_list.blp +++ b/tests/sample_errors/obj_in_string_list.blp @@ -3,7 +3,7 @@ using Gtk 4.0; StringList { strings [ id, - ]; + ] } Widget id {} diff --git a/tests/sample_errors/size_group_non_widget.blp b/tests/sample_errors/size_group_non_widget.blp index 4f99ea2..15022ac 100644 --- a/tests/sample_errors/size_group_non_widget.blp +++ b/tests/sample_errors/size_group_non_widget.blp @@ -3,7 +3,7 @@ using GObject 2.0; SizeGroup { mode: horizontal; - widgets [object]; + widgets [object] } GObject.Object object {} diff --git a/tests/sample_errors/size_group_obj_dne.blp b/tests/sample_errors/size_group_obj_dne.blp index 0e43faa..4eb3d2b 100644 --- a/tests/sample_errors/size_group_obj_dne.blp +++ b/tests/sample_errors/size_group_obj_dne.blp @@ -3,5 +3,5 @@ using GObject 2.0; SizeGroup { mode: horizontal; - widgets [object]; + widgets [object] } diff --git a/tests/sample_errors/styles_in_non_widget.blp b/tests/sample_errors/styles_in_non_widget.blp index 816d4a9..9ec868c 100644 --- a/tests/sample_errors/styles_in_non_widget.blp +++ b/tests/sample_errors/styles_in_non_widget.blp @@ -2,5 +2,5 @@ using Gtk 4.0; using GObject 2.0; GObject.Object { - styles []; + styles [] } diff --git a/tests/sample_errors/widgets_in_non_size_group.blp b/tests/sample_errors/widgets_in_non_size_group.blp index 82886a1..c73204d 100644 --- a/tests/sample_errors/widgets_in_non_size_group.blp +++ b/tests/sample_errors/widgets_in_non_size_group.blp @@ -1,5 +1,5 @@ using Gtk 4.0; Widget { - widgets []; + widgets [] } diff --git a/tests/samples/combo_box_text.blp b/tests/samples/combo_box_text.blp index 954c1ea..7a1b7f0 100644 --- a/tests/samples/combo_box_text.blp +++ b/tests/samples/combo_box_text.blp @@ -5,5 +5,5 @@ ComboBoxText { "Hello, world!", _("Hello!"), item_id: "item", - ]; + ] } diff --git a/tests/samples/file_filter.blp b/tests/samples/file_filter.blp index 509acdc..921a254 100644 --- a/tests/samples/file_filter.blp +++ b/tests/samples/file_filter.blp @@ -2,7 +2,7 @@ using Gtk 4.0; FileFilter { name: "File Filter Name"; - mime-types ["text/plain", "image/ *"]; - patterns ["*.txt"]; - suffixes ["png"]; + mime-types ["text/plain", "image/ *"] + patterns ["*.txt"] + suffixes ["png"] } diff --git a/tests/samples/size_group.blp b/tests/samples/size_group.blp index c48958b..a4226f6 100644 --- a/tests/samples/size_group.blp +++ b/tests/samples/size_group.blp @@ -2,7 +2,7 @@ using Gtk 4.0; SizeGroup { mode: horizontal; - widgets [label, button]; + widgets [label, button] } Label label {} diff --git a/tests/samples/string_list.blp b/tests/samples/string_list.blp index 02c133b..2f1198c 100644 --- a/tests/samples/string_list.blp +++ b/tests/samples/string_list.blp @@ -4,5 +4,5 @@ StringList { strings [ "Hello, world!", _("Hello!"), - ]; + ] } diff --git a/tests/samples/style.blp b/tests/samples/style.blp index a42aa65..c1cb091 100644 --- a/tests/samples/style.blp +++ b/tests/samples/style.blp @@ -1,5 +1,5 @@ using Gtk 4.0; Label { - styles ["class-1", "class-2"]; + styles ["class-1", "class-2"] }