mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
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:
parent
e759569c3f
commit
981c2e3b7d
10 changed files with 14 additions and 17 deletions
|
@ -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\"];")
|
||||
|
||||
|
|
|
@ -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];")
|
||||
|
|
|
@ -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\"];")
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ using GObject 2.0;
|
|||
|
||||
SizeGroup {
|
||||
mode: horizontal;
|
||||
widgets: [object];
|
||||
widgets [object];
|
||||
}
|
||||
|
||||
GObject.Object object {}
|
||||
|
|
|
@ -1 +1 @@
|
|||
6,13,6,Cannot assign GObject.Object to Gtk.Widget
|
||||
6,12,6,Cannot assign GObject.Object to Gtk.Widget
|
||||
|
|
|
@ -3,5 +3,5 @@ using GObject 2.0;
|
|||
|
||||
SizeGroup {
|
||||
mode: horizontal;
|
||||
widgets: [object];
|
||||
widgets [object];
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
6,13,6,Could not find object with ID object
|
||||
6,12,6,Could not find object with ID object
|
||||
|
|
|
@ -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"];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ using Gtk 4.0;
|
|||
|
||||
SizeGroup {
|
||||
mode: horizontal;
|
||||
widgets: [label, button];
|
||||
widgets [label, button];
|
||||
}
|
||||
|
||||
Label label {}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Label {
|
||||
styles: ["class-1", "class-2"];
|
||||
styles ["class-1", "class-2"];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue