Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qmlpropdef: support list property types #34

Merged
merged 1 commit into from
Dec 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,15 @@ function qmlweb_parse($TEXT, document_type, exigent_mode) {
function qmlpropdef() {
var type = S.token.value;
next();

var subtype;
if (is("operator", "<")) {
next();
subtype = S.token.value;
next();
expect_token("operator", ">");
}

var name = S.token.value;
next();
if (type == "alias") {
Expand Down
1 change: 1 addition & 0 deletions tests/qml/Properties.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ Rectangle {
property var foo: {}
property var bar: []
property Item item: Item {}
property list<Item> items
}
7 changes: 6 additions & 1 deletion tests/qml/Properties.qml.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,12 @@
[]
]
],
"Item {}\n"
"Item {}\n "
],
[
"qmlpropdef",
"items",
"list"
]
]
]
Expand Down