Use <> instead of () for casts & typeof

This makes it clearer that they aren't functions, and it eliminates
syntactic ambiguity with closure expressions.
This commit is contained in:
James Westman 2023-04-10 09:38:56 -05:00
parent d6bd282e58
commit 02796fd830
10 changed files with 66 additions and 11 deletions

View file

@ -1,3 +1,4 @@
3,1,8,Use the '$' extern syntax introduced in blueprint 0.8.0
4,15,15,Use angle bracket syntax introduced in blueprint 0.8.0
4,16,13,Use the '$' extern syntax introduced in blueprint 0.8.0
5,14,7,Use the '$' extern syntax introduced in blueprint 0.8.0

View file

@ -1,5 +1,5 @@
using Gtk 4.0;
Label my-label {
label: bind ($my-closure(my-label.margin-bottom)) as (string);
label: bind ($my-closure(my-label.margin-bottom)) as <string>;
}

View file

@ -1,5 +1,5 @@
using Gtk 4.0;
Label {
label: bind $my-closure (true, 10, "Hello") as (string);
label: bind $my-closure (true, 10, "Hello") as <string>;
}

View file

@ -5,5 +5,5 @@ Overlay {
}
Label {
label: bind (label.parent) as (Overlay).child as (Label).label;
label: bind (label.parent) as <Overlay>.child as <Label>.label;
}

View file

@ -1,5 +1,5 @@
using Gtk 4.0;
template MyTemplate : Box {
prop1: bind MyTemplate.prop2 as ($MyObject).prop3;
prop1: bind MyTemplate.prop2 as <$MyObject>.prop3;
}

View file

@ -1,5 +1,5 @@
using Gtk 4.0;
template MyTemplate : $MyParentClass {
prop1: bind MyTemplate.prop2 as ($MyObject).prop3;
prop1: bind MyTemplate.prop2 as <$MyObject>.prop3;
}

View file

@ -3,9 +3,9 @@ using GObject 2.0;
using Gio 2.0;
Gio.ListStore {
item-type: typeof(GObject.Object);
item-type: typeof<GObject.Object>;
}
Gio.ListStore {
item-type: typeof($MyObject);
item-type: typeof<$MyObject>;
}