mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Support array type
This commit is contained in:
parent
f1cf70b6eb
commit
da5b9909fc
16 changed files with 133 additions and 4 deletions
5
tests/sample_errors/array_wrong_type.blp
Normal file
5
tests/sample_errors/array_wrong_type.blp
Normal file
|
@ -0,0 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Label {
|
||||
label: [1];
|
||||
}
|
1
tests/sample_errors/array_wrong_type.err
Normal file
1
tests/sample_errors/array_wrong_type.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,12,3,Cannot assign array to string
|
6
tests/sample_errors/array_wrong_type_value.blp
Normal file
6
tests/sample_errors/array_wrong_type_value.blp
Normal file
|
@ -0,0 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
AboutDialog about {
|
||||
valign: center;
|
||||
authors: [1];
|
||||
}
|
1
tests/sample_errors/array_wrong_type_value.err
Normal file
1
tests/sample_errors/array_wrong_type_value.err
Normal file
|
@ -0,0 +1 @@
|
|||
5,15,1,Cannot convert number to string
|
6
tests/sample_errors/newline_in_string_array.blp
Normal file
6
tests/sample_errors/newline_in_string_array.blp
Normal file
|
@ -0,0 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
AboutDialog about {
|
||||
valign: center;
|
||||
authors: ["Olimar\n"];
|
||||
}
|
1
tests/sample_errors/newline_in_string_array.err
Normal file
1
tests/sample_errors/newline_in_string_array.err
Normal file
|
@ -0,0 +1 @@
|
|||
5,15,10,String literals inside arrays can't contain newlines
|
6
tests/sample_errors/newline_in_string_array_multi.blp
Normal file
6
tests/sample_errors/newline_in_string_array_multi.blp
Normal file
|
@ -0,0 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
AboutDialog about {
|
||||
valign: center;
|
||||
authors: ["Olimar\n", "Luie\nPresident"];
|
||||
}
|
2
tests/sample_errors/newline_in_string_array_multi.err
Normal file
2
tests/sample_errors/newline_in_string_array_multi.err
Normal file
|
@ -0,0 +1,2 @@
|
|||
5,15,10,String literals inside arrays can't contain newlines
|
||||
5,27,17,String literals inside arrays can't contain newlines
|
6
tests/samples/string_array.blp
Normal file
6
tests/samples/string_array.blp
Normal file
|
@ -0,0 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
AboutDialog about {
|
||||
valign: center;
|
||||
authors: ["Jane doe <jane-doe@email.com>", "Jhonny D <jd@email.com>"];
|
||||
}
|
14
tests/samples/string_array.ui
Normal file
14
tests/samples/string_array.ui
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
DO NOT EDIT!
|
||||
This file was @generated by blueprint-compiler. Instead, edit the
|
||||
corresponding .blp file and regenerate this file with blueprint-compiler.
|
||||
-->
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkAboutDialog" id="about">
|
||||
<property name="valign">3</property>
|
||||
<property name="authors">Jane doe <jane-doe@email.com>
|
||||
Jhonny D <jd@email.com></property>
|
||||
</object>
|
||||
</interface>
|
Loading…
Add table
Add a link
Reference in a new issue