Improve value parsing

Parse values as different AST nodes rather than just strings. This
allows for better validation and will eventually make expressions
possible.
This commit is contained in:
James Westman 2021-11-01 21:51:25 -05:00
parent 5f0eef5f2e
commit 80b5698533
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
16 changed files with 352 additions and 138 deletions

6
tests/samples/flags.blp Normal file
View file

@ -0,0 +1,6 @@
using Gtk 4.0;
using Gio 2.0;
Gio.Application {
flags: is_service | handles_open;
}

7
tests/samples/flags.ui Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GApplication">
<property name="flags">is_service|handles_open</property>
</object>
</interface>

View file

@ -2,7 +2,7 @@
<interface>
<requires lib="gtk" version="4.0"/>
<menu>
<attribute name="label" translatable="yes">menu label</attribute>
<attribute name="label" translatable="true">menu label</attribute>
<attribute name="test-custom-attribute">3.1415</attribute>
<submenu>
<section>

View file

@ -1,5 +1,5 @@
using Gtk 4.0;
Box {
orientation: VERTICAL;
orientation: vertical;
}

View file

@ -2,6 +2,6 @@
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkBox">
<property name="orientation">VERTICAL</property>
<property name="orientation">vertical</property>
</object>
</interface>