summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser/qdeclarativejs.g
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-04-16 09:15:55 (GMT)
committerRoberto Raggi <roberto.raggi@nokia.com>2010-04-16 09:53:40 (GMT)
commit561a7bf35b96ffe70ebafc3876e965ef41b4441d (patch)
tree100a9fcde25a603ddb1627da20b3a74fb912d726 /src/declarative/qml/parser/qdeclarativejs.g
parent269623184ee55bd8126cf3ae5cfb619d3bdda91b (diff)
downloadQt-561a7bf35b96ffe70ebafc3876e965ef41b4441d.zip
Qt-561a7bf35b96ffe70ebafc3876e965ef41b4441d.tar.gz
Qt-561a7bf35b96ffe70ebafc3876e965ef41b4441d.tar.bz2
Fixed parsing of inner labelled statements.
The JS grammar is ambigious and the following statement can be parsed as an object-literal followed by an inserted semicolon or as two labelled statements. outer: { inner: {} } In the old days we used to resolve the conflict by reducing the statement to an expression statement but this was wrong so now we prefer the labelled statement. As nice side effect, we pass two more tests in tests/auto/declarative/parserstress. Task-number: QTBUG-8108
Diffstat (limited to 'src/declarative/qml/parser/qdeclarativejs.g')
-rw-r--r--src/declarative/qml/parser/qdeclarativejs.g2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/declarative/qml/parser/qdeclarativejs.g
index ba9338e..1b66ba0 100644
--- a/src/declarative/qml/parser/qdeclarativejs.g
+++ b/src/declarative/qml/parser/qdeclarativejs.g
@@ -1376,7 +1376,7 @@ case $rule_number: {
} break;
./
-PropertyName: T_IDENTIFIER %prec REDUCE_HERE ;
+PropertyName: T_IDENTIFIER %prec SHIFT_THERE ;
/.
case $rule_number: {
AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);