aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljs.g
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-07-05 16:27:56 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-07-09 16:53:09 +0200
commit5c3326702fcb200e9af594f66696cd8c21ac7e85 (patch)
treec0d9deb7053a387243c34157af7eafdac754ae47 /src/qml/parser/qqmljs.g
parent910f98031fdd834a22af0da21c9ff6ae145f61c5 (diff)
Add support for type script QML signal parameter declarations
We support signal(int param) but we should also support signal(param: int) for consistency with the syntax now supported for functions. Change-Id: Ic064bbaac45024d3663562819f3c1f3f4a918a56 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljs.g')
-rw-r--r--src/qml/parser/qqmljs.g11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qml/parser/qqmljs.g b/src/qml/parser/qqmljs.g
index b10063c7a5..76d2d75cfc 100644
--- a/src/qml/parser/qqmljs.g
+++ b/src/qml/parser/qqmljs.g
@@ -1116,6 +1116,17 @@ UiParameterList: UiPropertyType QmlIdentifier;
} break;
./
+UiParameterList: QmlIdentifier T_COLON UiPropertyType;
+/.
+ case $rule_number: {
+ AST::UiParameterList *node = new (pool) AST::UiParameterList(sym(3).UiQualifiedId->finish(), stringRef(1));
+ node->identifierToken = loc(1);
+ node->colonToken = loc(2);
+ node->propertyTypeToken = loc(3);
+ sym(1).Node = node;
+ } break;
+./
+
UiParameterList: UiParameterList T_COMMA UiPropertyType QmlIdentifier;
/.
case $rule_number: {