implement variant parsing

This commit is contained in:
jgcodes2020 2024-12-24 08:50:37 -05:00
parent bc10ccee0c
commit be667a2b9c
4 changed files with 139 additions and 16 deletions

View file

@ -1,16 +1,16 @@
using Gtk 4.0;
menu root {
submenu {
name: "one";
item {
action: "app.foo_bar";
target: variant<"s">("\"one\"");
}
}
}
Button {
action-name: "app.shave_yak";
action-target: variant<"y">("8");
$BlueprintTestObject {
// test-one: variant<"s">("one");
test-zero: variant<"b">(true);
test-one: variant<"s">("one");
test-two: variant<"i">(2);
test-three: variant<"(ii)">((3, 4));
test-four: variant<"ai">([5, 6]);
test-five: variant<"{sv}">({"key", <"value">});
test-six: variant<"a{ss}">({
"GLib": "2.24",
"Gtk": "4.16"
});
test-seven: variant<"ams">([just "2", nothing]);
}