Fix parsing decimals

A number literal is a float if it contains ".", not if it is divisible
by 1. For example, 1.0 should be considered a float literal.
This commit is contained in:
James Westman 2023-06-14 15:22:57 -05:00
parent c69a12096c
commit 883a136103
8 changed files with 24 additions and 6 deletions

View file

@ -0,0 +1,5 @@
using Gtk 4.0;
Adjustment {
value: bind 1.0 as <double>;
}

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment">
<binding name="value">
<constant type="gfloat">1</constant>
</binding>
</object>
</interface>

View file

@ -2,7 +2,7 @@ using Gtk 4.0;
Gtk.Label {
xalign: .5;
yalign: 0.0;
height-request: 1_000_000;
margin-top: 0x30;
}

View file

@ -3,6 +3,7 @@
<requires lib="gtk" version="4.0"/>
<object class="GtkLabel">
<property name="xalign">0.5</property>
<property name="yalign">0</property>
<property name="height-request">1000000</property>
<property name="margin-top">48</property>
</object>