This commit is contained in:
Sarah Jamie Lewis 2020-07-05 16:30:07 -07:00
parent 4ca323300f
commit 15dba79edc
4 changed files with 27 additions and 19 deletions

View File

@ -33,6 +33,6 @@ function = {WHITE_SPACE* ~ ident ~ WHITE_SPACE* ~ "=" ~ WHITE_SPACE* ~ "[[" ~ fu
property = {WHITE_SPACE* ~ ident ~ ":" ~ WHITE_SPACE* ~ (number|string |ident|function) ~ NEWLINE* }
body = {WHITE_SPACE* ~ ident ~ WHITE_SPACE ~ "{" ~ NEWLINE* ~ (property|function|body)+ ~ NEWLINE* ~ WHITE_SPACE* ~ "}" ~ NEWLINE?}
body = {WHITE_SPACE* ~ ident ~ WHITE_SPACE ~ "{" ~ NEWLINE* ~ (property|function|body)* ~ NEWLINE* ~ WHITE_SPACE* ~ "}" ~ NEWLINE?}
qml = {import* ~ NEWLINE* ~ body}

24
res/HelloTwitter.qml Normal file
View File

@ -0,0 +1,24 @@
Grid {
rows:2
cols:2
Rectangle {
color: "blue"
Text {
anchors.centerIn: parent
text: "Hello, Twitter! 🦀"
}
}
Rectangle {
color: "red"
}
Rectangle {
color: "red"
}
Rectangle {
color: "blue"
Text {
anchors.centerIn: parent
text: "Hello, Twitter! 🦀"
}
}
}

View File

@ -1,16 +0,0 @@
Grid {
rows:2
cols:2
Rectangle {
color: "blue"
}
Rectangle {
color: "red"
}
Rectangle {
color: "red"
}
Rectangle {
color: "blue"
}
}

View File

@ -2,8 +2,8 @@ Grid {
rows: 2
columns: 2
RedRectangle {
null:null
HelloTwitter {
}
Rectangle {