Remove the ':' in a few places

Changed my mind, I think it's more confusing to use the colon for
properties when they aren't really properties.
This commit is contained in:
James Westman 2021-11-12 17:47:09 -06:00
parent e759569c3f
commit 981c2e3b7d
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
10 changed files with 14 additions and 17 deletions

View file

@ -48,7 +48,6 @@ def create_node(tag_name: str, singular: str):
Statement(
Keyword(tag_name),
UseLiteral("tag_name", tag_name),
Op(":"),
OpenBracket(),
Delimited(
Group(
@ -77,7 +76,7 @@ suffixes = create_node("suffixes", "suffix")
def file_filter_completer(ast_node, match_variables):
file_filter = ast_node.root.gir.get_type("FileFilter", "Gtk")
if ast_node.gir_class and ast_node.gir_class.assignable_to(file_filter):
yield Completion("mime-types", CompletionItemKind.Snippet, snippet="mime-types: [\"$0\"];")
yield Completion("patterns", CompletionItemKind.Snippet, snippet="patterns: [\"$0\"];")
yield Completion("suffixes", CompletionItemKind.Snippet, snippet="suffixes: [\"$0\"];")
yield Completion("mime-types", CompletionItemKind.Snippet, snippet="mime-types [\"$0\"];")
yield Completion("patterns", CompletionItemKind.Snippet, snippet="patterns [\"$0\"];")
yield Completion("suffixes", CompletionItemKind.Snippet, snippet="suffixes [\"$0\"];")

View file

@ -58,7 +58,6 @@ widgets = Group(
Widgets,
Statement(
Keyword("widgets"),
Op(":"),
OpenBracket(),
Delimited(
Group(
@ -79,4 +78,4 @@ widgets = Group(
def file_filter_completer(ast_node, match_variables):
file_filter = ast_node.root.gir.get_type("SizeGroup", "Gtk")
if ast_node.gir_class and ast_node.gir_class.assignable_to(file_filter):
yield Completion("widgets", CompletionItemKind.Snippet, snippet="mime-types: [$0];")
yield Completion("widgets", CompletionItemKind.Snippet, snippet="widgets [$0];")

View file

@ -44,7 +44,6 @@ styles = Group(
Styles,
Statement(
Keyword("styles"),
Op(":"),
OpenBracket(),
Delimited(
Group(
@ -63,5 +62,5 @@ styles = Group(
matches=new_statement_patterns,
)
def style_completer(ast_node, match_variables):
yield Completion("styles", CompletionItemKind.Keyword, snippet="styles: [\"$0\"];")
yield Completion("styles", CompletionItemKind.Keyword, snippet="styles [\"$0\"];")

View file

@ -3,7 +3,7 @@ using GObject 2.0;
SizeGroup {
mode: horizontal;
widgets: [object];
widgets [object];
}
GObject.Object object {}

View file

@ -1 +1 @@
6,13,6,Cannot assign GObject.Object to Gtk.Widget
6,12,6,Cannot assign GObject.Object to Gtk.Widget

View file

@ -3,5 +3,5 @@ using GObject 2.0;
SizeGroup {
mode: horizontal;
widgets: [object];
widgets [object];
}

View file

@ -1 +1 @@
6,13,6,Could not find object with ID object
6,12,6,Could not find object with ID object

View file

@ -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"];
}

View file

@ -2,7 +2,7 @@ using Gtk 4.0;
SizeGroup {
mode: horizontal;
widgets: [label, button];
widgets [label, button];
}
Label label {}

View file

@ -1,5 +1,5 @@
using Gtk 4.0;
Label {
styles: ["class-1", "class-2"];
styles ["class-1", "class-2"];
}