Initial commit.
This commit is contained in:
commit
12487502ee
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
old/
|
||||||
|
bin/
|
||||||
|
lib/
|
||||||
|
src/zig-cache
|
7
assets/children.gui
Normal file
7
assets/children.gui
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Object {
|
||||||
|
property string thing: "i has the thing"
|
||||||
|
|
||||||
|
Object {
|
||||||
|
property string thing: "i has the other thing"
|
||||||
|
}
|
||||||
|
}
|
16
assets/imbricated_rectangles.gui
Normal file
16
assets/imbricated_rectangles.gui
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Rectangle {
|
||||||
|
color: "red"
|
||||||
|
width: 300
|
||||||
|
height: 200
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "blue"
|
||||||
|
width: 100
|
||||||
|
height: 100
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
top: 50
|
||||||
|
left: 50
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
6
assets/property_binding.gui
Normal file
6
assets/property_binding.gui
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Object (the-object) {
|
||||||
|
property string thing: "i has the thing"
|
||||||
|
property string thing-alt: thing
|
||||||
|
property string thing-alt-2: self.thing
|
||||||
|
property string thing-alt-3: the-object.thing
|
||||||
|
}
|
7
assets/property_binding_through_children.gui
Normal file
7
assets/property_binding_through_children.gui
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Object {
|
||||||
|
property string thing: "i has the thing"
|
||||||
|
|
||||||
|
Object {
|
||||||
|
property string thing: parent.thing
|
||||||
|
}
|
||||||
|
}
|
43
assets/rectangle_with_dynamic_anchors.gui
Normal file
43
assets/rectangle_with_dynamic_anchors.gui
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
Rectangle {
|
||||||
|
color: "red"
|
||||||
|
width: 300
|
||||||
|
height: 200
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "black"
|
||||||
|
width: 50
|
||||||
|
height: 50
|
||||||
|
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
color: "blue"
|
||||||
|
width: 50
|
||||||
|
height: 50
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
color: "yellow"
|
||||||
|
width: 50
|
||||||
|
height: 50
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
bottom: parent.bottom
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
color: "green"
|
||||||
|
width: 50
|
||||||
|
height: 50
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
bottom: parent.bottom
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
assets/rectangle_with_event.gui
Normal file
7
assets/rectangle_with_event.gui
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Rectangle {
|
||||||
|
id: clickable
|
||||||
|
color: "blue"
|
||||||
|
width: 300
|
||||||
|
height: 300
|
||||||
|
onClick: emit ["hello, there", "i has events"]
|
||||||
|
}
|
7
assets/rectangle_with_simple_event.gui
Normal file
7
assets/rectangle_with_simple_event.gui
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Rectangle {
|
||||||
|
id: clickable
|
||||||
|
color: "blue"
|
||||||
|
width: 300
|
||||||
|
height: 300
|
||||||
|
onClick: emit!
|
||||||
|
}
|
4
assets/simple_declarations.gui
Normal file
4
assets/simple_declarations.gui
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Object {
|
||||||
|
property string a: "A"
|
||||||
|
property string b: "B"
|
||||||
|
}
|
5
assets/simple_rectangle.gui
Normal file
5
assets/simple_rectangle.gui
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Rectangle {
|
||||||
|
color: "red"
|
||||||
|
width: 300
|
||||||
|
height: 200
|
||||||
|
}
|
36
assets/syntax.gui
Normal file
36
assets/syntax.gui
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
Object (id) {
|
||||||
|
property String property-string-lalala: "value"
|
||||||
|
property Number property-number+lalala??: 12.4
|
||||||
|
property (String|Number) lalala: 42
|
||||||
|
|
||||||
|
# Sets a whole hash as attribute.
|
||||||
|
property hash property-hash: {
|
||||||
|
a: b
|
||||||
|
}
|
||||||
|
|
||||||
|
### [[[ UNCERTAIN FEATURE STARTS HERE
|
||||||
|
# Sets specific properties in a predefined hash.
|
||||||
|
property-hash-overload {
|
||||||
|
a: b
|
||||||
|
c: 12
|
||||||
|
}
|
||||||
|
# Sets a single property in a predefined hash.
|
||||||
|
property-hash-overload-alt.a: b
|
||||||
|
### ]]] UNCERTAIN FEATURE ENDS HERE
|
||||||
|
|
||||||
|
Object (id-child-1) {
|
||||||
|
property string property-child: "value"
|
||||||
|
|
||||||
|
Object (id-child-1-1) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
Object (id-child-2) {
|
||||||
|
property string property-child: "value-alt"
|
||||||
|
|
||||||
|
Object {}
|
||||||
|
}
|
||||||
|
|
||||||
|
"string-child, probably ignored"
|
||||||
|
|
||||||
|
12 # Integer child, probably ignored
|
||||||
|
}
|
9
assets/text_label.gui
Normal file
9
assets/text_label.gui
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Text {
|
||||||
|
text: "Hello, there!"
|
||||||
|
font {
|
||||||
|
family: SansSerif
|
||||||
|
pixelSize: 15
|
||||||
|
}
|
||||||
|
width: 200
|
||||||
|
height: 200
|
||||||
|
}
|
1921
src/tokenizer.zig
Normal file
1921
src/tokenizer.zig
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user