summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser/qmljs.g
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-07-26 23:43:22 (GMT)
committerRoberto Raggi <roberto.raggi@nokia.com>2009-07-26 23:43:22 (GMT)
commit05c1db3b28067336fcf14cce7909d1f09007998b (patch)
treea617a6eefd4f4ed93dcb896079f51ea76043e18e /src/declarative/qml/parser/qmljs.g
parent80476372e6f4dd3e179eeba949e86a336bc8fde3 (diff)
downloadQt-05c1db3b28067336fcf14cce7909d1f09007998b.zip
Qt-05c1db3b28067336fcf14cce7909d1f09007998b.tar.gz
Qt-05c1db3b28067336fcf14cce7909d1f09007998b.tar.bz2
Added formal parameters to the QML signals.
Diffstat (limited to 'src/declarative/qml/parser/qmljs.g')
-rw-r--r--src/declarative/qml/parser/qmljs.g52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/declarative/qml/parser/qmljs.g b/src/declarative/qml/parser/qmljs.g
index ccfe7fd..a1c4ba2 100644
--- a/src/declarative/qml/parser/qmljs.g
+++ b/src/declarative/qml/parser/qmljs.g
@@ -271,6 +271,9 @@ public:
AST::UiObjectMemberList *UiObjectMemberList;
AST::UiArrayMemberList *UiArrayMemberList;
AST::UiQualifiedId *UiQualifiedId;
+ AST::UiSignature *UiSignature;
+ AST::UiFormalList *UiFormalList;
+ AST::UiFormal *UiFormal;
};
public:
@@ -880,13 +883,62 @@ case $rule_number: {
./
UiFormal: JsIdentifier ;
+/.
+case $rule_number: {
+ AST::UiFormal *node = makeAstNode<AST::UiFormal>(driver->nodePool(), sym(1).sval);
+ node->identifierToken = loc(1);
+ sym(1).UiFormal = node;
+} break;
+./
+
UiFormal: JsIdentifier T_AS JsIdentifier ;
+/.
+case $rule_number: {
+ AST::UiFormal *node = makeAstNode<AST::UiFormal>(driver->nodePool(),
+ sym(1).sval, sym(3).sval);
+ node->identifierToken = loc(1);
+ node->asToken = loc(2);
+ node->aliasToken = loc(3);
+ sym(1).UiFormal = node;
+} break;
+./
UiFormalList: UiFormal ;
+/.
+case $rule_number: {
+ sym(1).UiFormalList = makeAstNode<AST::UiFormalList>(driver->nodePool(),
+ sym(1).UiFormal);
+} break;
+./
+
UiFormalList: UiFormalList T_COMMA UiFormal ;
+/.
+case $rule_number: {
+ sym(1).UiFormalList = makeAstNode<AST::UiFormalList>(driver->nodePool(),
+ sym(1).UiFormalList, sym(3).UiFormal);
+} break;
+./
UiSignature: T_LPAREN T_RPAREN ;
+/.
+case $rule_number: {
+ AST::UiSignature *node = makeAstNode<AST::UiSignature>(driver->nodePool());
+ node->lparenToken = loc(1);
+ node->rparenToken = loc(3);
+ sym(1).UiSignature = node;
+} break;
+./
+
UiSignature: T_LPAREN UiFormalList T_RPAREN ;
+/.
+case $rule_number: {
+ AST::UiSignature *node = makeAstNode<AST::UiSignature>(driver->nodePool(),
+ sym(2).UiFormalList->finish());
+ node->lparenToken = loc(1);
+ node->rparenToken = loc(3);
+ sym(1).UiSignature = node;
+} break;
+./
UiObjectMember: T_SIGNAL T_IDENTIFIER T_LPAREN UiParameterListOpt T_RPAREN T_AUTOMATIC_SEMICOLON ;
UiObjectMember: T_SIGNAL T_IDENTIFIER T_LPAREN UiParameterListOpt T_RPAREN T_SEMICOLON ;