diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-07-15 22:30:14 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-07-15 22:30:14 (GMT) |
commit | 50f400ac20e918db1d0a6496003d953dedaba42a (patch) | |
tree | b1e03e544c0fd09f2070c5ebb95bd291b7dc39b2 /src/declarative/qml/parser/qmljsparser.cpp | |
parent | fe591031a8550a8a8c97fa08f0bdf8c2f9d4cf93 (diff) | |
parent | bcae9d84fb5dd2bdc5a5298c8841702505a02867 (diff) | |
download | Qt-50f400ac20e918db1d0a6496003d953dedaba42a.zip Qt-50f400ac20e918db1d0a6496003d953dedaba42a.tar.gz Qt-50f400ac20e918db1d0a6496003d953dedaba42a.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml/parser/qmljsparser.cpp')
-rw-r--r-- | src/declarative/qml/parser/qmljsparser.cpp | 1003 |
1 files changed, 248 insertions, 755 deletions
diff --git a/src/declarative/qml/parser/qmljsparser.cpp b/src/declarative/qml/parser/qmljsparser.cpp index a13b425..08a424e 100644 --- a/src/declarative/qml/parser/qmljsparser.cpp +++ b/src/declarative/qml/parser/qmljsparser.cpp @@ -1,7 +1,5 @@ // This file was generated by qlalr - DO NOT EDIT! -#line 95 "qmljs.g" - /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). @@ -53,8 +51,6 @@ #include "qmljsnodepool_p.h" -#line 349 "qmljs.g" - #include "qmljsparser_p.h" #include <QVarLengthArray> @@ -147,14 +143,16 @@ AST::UiQualifiedId *Parser::reparseAsQualifiedId(AST::ExpressionNode *expr) return 0; } -bool Parser::parse() +bool Parser::parse(int startToken) { Lexer *lexer = driver->lexer(); bool hadErrors = false; int yytoken = -1; int action = 0; - first_token = last_token = 0; + token_buffer[0].token = startToken; + first_token = &token_buffer[0]; + last_token = &token_buffer[1]; tos = -1; program = 0; @@ -197,36 +195,40 @@ bool Parser::parse() switch (r) { -#line 498 "qmljs.g" - case 0: { - program = makeAstNode<AST::UiProgram> (driver->nodePool(), sym(1).UiImportList, - sym(2).UiObjectMemberList->finish()); - sym(1).UiProgram = program; + sym(1).Node = sym(2).Node; + program = sym(1).Node; } break; -#line 508 "qmljs.g" +case 1: { + sym(1).Node = sym(2).Node; + program = sym(1).Node; +} break; case 2: { - sym(1).Node = sym(1).UiImportList->finish(); + sym(1).Node = sym(2).Node; + program = sym(1).Node; } break; -#line 515 "qmljs.g" - case 3: { - sym(1).Node = makeAstNode<AST::UiImportList> (driver->nodePool(), sym(1).UiImport); + sym(1).UiProgram = makeAstNode<AST::UiProgram> (driver->nodePool(), sym(1).UiImportList, + sym(2).UiObjectMemberList->finish()); } break; -#line 522 "qmljs.g" +case 5: { + sym(1).Node = sym(1).UiImportList->finish(); +} break; -case 4: { +case 6: { + sym(1).Node = makeAstNode<AST::UiImportList> (driver->nodePool(), sym(1).UiImport); +} break; + +case 7: { sym(1).Node = makeAstNode<AST::UiImportList> (driver->nodePool(), sym(1).UiImportList, sym(2).UiImport); } break; -#line 531 "qmljs.g" - -case 6: { +case 9: { AST::UiImport *node = makeAstNode<AST::UiImport>(driver->nodePool(), sym(2).sval); node->importToken = loc(1); node->fileNameToken = loc(2); @@ -234,9 +236,7 @@ case 6: { sym(1).Node = node; } break; -#line 543 "qmljs.g" - -case 8: { +case 11: { AST::UiImport *node = makeAstNode<AST::UiImport>(driver->nodePool(), sym(2).sval); node->importId = sym(4).sval; node->importToken = loc(1); @@ -247,9 +247,7 @@ case 8: { sym(1).Node = node; } break; -#line 558 "qmljs.g" - -case 10: { +case 13: { AST::UiImport *node = makeAstNode<AST::UiImport>(driver->nodePool(), sym(2).UiQualifiedId->finish()); node->importToken = loc(1); node->fileNameToken = loc(2); @@ -257,9 +255,7 @@ case 10: { sym(1).Node = node; } break; -#line 570 "qmljs.g" - -case 12: { +case 15: { AST::UiImport *node = makeAstNode<AST::UiImport>(driver->nodePool(), sym(2).UiQualifiedId->finish()); node->importToken = loc(1); node->fileNameToken = loc(2); @@ -268,9 +264,7 @@ case 12: { sym(1).Node = node; } break; -#line 583 "qmljs.g" - -case 14: { +case 17: { AST::UiImport *node = makeAstNode<AST::UiImport>(driver->nodePool(), sym(2).UiQualifiedId->finish()); node->importId = sym(5).sval; node->importToken = loc(1); @@ -282,9 +276,7 @@ case 14: { sym(1).Node = node; } break; -#line 599 "qmljs.g" - -case 16: { +case 19: { AST::UiImport *node = makeAstNode<AST::UiImport>(driver->nodePool(), sym(2).UiQualifiedId->finish()); node->importId = sym(4).sval; node->importToken = loc(1); @@ -295,76 +287,56 @@ case 16: { sym(1).Node = node; } break; -#line 613 "qmljs.g" - -case 17: { +case 20: { sym(1).Node = 0; } break; -#line 620 "qmljs.g" - -case 18: { +case 21: { sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember); } break; -#line 627 "qmljs.g" - -case 19: { +case 22: { sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember); } break; -#line 634 "qmljs.g" - -case 20: { +case 23: { AST::UiObjectMemberList *node = makeAstNode<AST:: UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMemberList, sym(2).UiObjectMember); sym(1).Node = node; } break; -#line 643 "qmljs.g" - -case 21: { +case 24: { sym(1).Node = makeAstNode<AST::UiArrayMemberList> (driver->nodePool(), sym(1).UiObjectMember); } break; -#line 650 "qmljs.g" - -case 22: { +case 25: { AST::UiArrayMemberList *node = makeAstNode<AST::UiArrayMemberList> (driver->nodePool(), sym(1).UiArrayMemberList, sym(3).UiObjectMember); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 660 "qmljs.g" - -case 23: { +case 26: { AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), (AST::UiObjectMemberList*)0); node->lbraceToken = loc(1); node->rbraceToken = loc(2); sym(1).Node = node; } break; -#line 670 "qmljs.g" - -case 24: { +case 27: { AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), sym(2).UiObjectMemberList->finish()); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -#line 680 "qmljs.g" - -case 25: { +case 28: { AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).UiQualifiedId->finish(), sym(2).UiObjectInitializer); sym(1).Node = node; } break; -#line 691 "qmljs.g" - -case 27: { +case 30: { AST::UiArrayBinding *node = makeAstNode<AST::UiArrayBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(), sym(4).UiArrayMemberList->finish()); node->colonToken = loc(2); @@ -373,25 +345,19 @@ case 27: { sym(1).Node = node; } break; -#line 703 "qmljs.g" - -case 28: { +case 31: { AST::StringLiteral *node = makeAstNode<AST::StringLiteral> (driver->nodePool(), sym(1).sval); node->literalToken = loc(1); sym(1).Node = node; } break; -#line 713 "qmljs.g" - -case 30: { +case 33: { AST::ExpressionStatement *node = makeAstNode<AST::ExpressionStatement> (driver->nodePool(), sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; -#line 723 "qmljs.g" - -case 31: { +case 34: { if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(3).Expression)) { AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(), qualifiedId, sym(4).UiObjectInitializer); @@ -406,21 +372,7 @@ case 31: { return false; // ### recover } } break; - -#line 742 "qmljs.g" -case 32: -#line 745 "qmljs.g" -case 33: -#line 748 "qmljs.g" -case 34: -#line 751 "qmljs.g" -case 35: -#line 754 "qmljs.g" -case 36: -#line 757 "qmljs.g" -case 37: -#line 759 "qmljs.g" - +case 35:case 36:case 37:case 38:case 39:case 40: { AST::UiScriptBinding *node = makeAstNode<AST::UiScriptBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(), sym(3).Statement); @@ -428,49 +380,35 @@ case 37: sym(1).Node = node; } break; -#line 769 "qmljs.g" - -case 38: - -#line 773 "qmljs.g" +case 41: -case 39: { +case 42: { sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); break; } -#line 783 "qmljs.g" - -case 41: { +case 44: { sym(1).Node = 0; } break; -#line 790 "qmljs.g" - -case 42: { +case 45: { sym(1).Node = sym(1).UiParameterList->finish (); } break; -#line 797 "qmljs.g" - -case 43: { +case 46: { AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).sval, sym(2).sval); node->identifierToken = loc(2); sym(1).Node = node; } break; -#line 806 "qmljs.g" - -case 44: { +case 47: { AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).UiParameterList, sym(3).sval, sym(4).sval); node->commaToken = loc(2); node->identifierToken = loc(4); sym(1).Node = node; } break; -#line 816 "qmljs.g" - -case 45: { +case 48: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval); node->type = AST::UiPublicMember::Signal; node->propertyToken = loc(1); @@ -480,9 +418,7 @@ case 45: { sym(1).Node = node; } break; -#line 829 "qmljs.g" - -case 46: { +case 49: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval); node->type = AST::UiPublicMember::Signal; node->propertyToken = loc(1); @@ -491,9 +427,7 @@ case 46: { sym(1).Node = node; } break; -#line 842 "qmljs.g" - -case 48: { +case 51: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval); node->propertyToken = loc(1); node->typeToken = loc(2); @@ -502,9 +436,7 @@ case 48: { sym(1).Node = node; } break; -#line 855 "qmljs.g" - -case 50: { +case 53: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval); node->isDefaultMember = true; node->defaultToken = loc(1); @@ -515,9 +447,7 @@ case 50: { sym(1).Node = node; } break; -#line 870 "qmljs.g" - -case 52: { +case 55: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval, sym(5).Expression); node->propertyToken = loc(1); @@ -528,9 +458,7 @@ case 52: { sym(1).Node = node; } break; -#line 885 "qmljs.g" - -case 54: { +case 57: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval, sym(6).Expression); node->isDefaultMember = true; @@ -543,104 +471,76 @@ case 54: { sym(1).Node = node; } break; -#line 901 "qmljs.g" - -case 55: { +case 58: { sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node); } break; -#line 908 "qmljs.g" - -case 56: { +case 59: { sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node); } break; - -#line 915 "qmljs.g" -case 57: -#line 918 "qmljs.g" - -case 58: +case 60: +case 61: { AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); node->identifierToken = loc(1); sym(1).Node = node; } break; -#line 930 "qmljs.g" - -case 60: { +case 63: { QString s = QLatin1String(QmlJSGrammar::spell[T_PROPERTY]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } -#line 939 "qmljs.g" - -case 61: { +case 64: { QString s = QLatin1String(QmlJSGrammar::spell[T_SIGNAL]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } -#line 952 "qmljs.g" - -case 62: { +case 65: { AST::ThisExpression *node = makeAstNode<AST::ThisExpression> (driver->nodePool()); node->thisToken = loc(1); sym(1).Node = node; } break; -#line 961 "qmljs.g" - -case 63: { +case 66: { AST::IdentifierExpression *node = makeAstNode<AST::IdentifierExpression> (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -#line 970 "qmljs.g" - -case 64: { +case 67: { AST::NullExpression *node = makeAstNode<AST::NullExpression> (driver->nodePool()); node->nullToken = loc(1); sym(1).Node = node; } break; -#line 979 "qmljs.g" - -case 65: { +case 68: { AST::TrueLiteral *node = makeAstNode<AST::TrueLiteral> (driver->nodePool()); node->trueToken = loc(1); sym(1).Node = node; } break; -#line 988 "qmljs.g" - -case 66: { +case 69: { AST::FalseLiteral *node = makeAstNode<AST::FalseLiteral> (driver->nodePool()); node->falseToken = loc(1); sym(1).Node = node; } break; -#line 997 "qmljs.g" - -case 67: { +case 70: { AST::NumericLiteral *node = makeAstNode<AST::NumericLiteral> (driver->nodePool(), sym(1).dval, lexer->flags); node->literalToken = loc(1); sym(1).Node = node; } break; -#line 1006 "qmljs.g" - -case 68: { +case 71: { AST::StringLiteral *node = makeAstNode<AST::StringLiteral> (driver->nodePool(), sym(1).sval); node->literalToken = loc(1); sym(1).Node = node; } break; -#line 1018 "qmljs.g" - -case 69: { +case 72: { bool rx = lexer->scanRegExp(Lexer::NoPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage())); @@ -651,9 +551,7 @@ case 69: { sym(1).Node = node; } break; -#line 1035 "qmljs.g" - -case 70: { +case 73: { bool rx = lexer->scanRegExp(Lexer::EqualPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage())); @@ -664,36 +562,28 @@ case 70: { sym(1).Node = node; } break; -#line 1049 "qmljs.g" - -case 71: { +case 74: { AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), (AST::Elision *) 0); node->lbracketToken = loc(1); node->rbracketToken = loc(2); sym(1).Node = node; } break; -#line 1059 "qmljs.g" - -case 72: { +case 75: { AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).Elision->finish()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -#line 1069 "qmljs.g" - -case 73: { +case 76: { AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish ()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -#line 1079 "qmljs.g" - -case 74: { +case 77: { AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (), (AST::Elision *) 0); node->lbracketToken = loc(1); @@ -702,9 +592,7 @@ case 74: { sym(1).Node = node; } break; -#line 1091 "qmljs.g" - -case 75: { +case 78: { AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (), sym(4).Elision->finish()); node->lbracketToken = loc(1); @@ -713,9 +601,7 @@ case 75: { sym(1).Node = node; } break; -#line 1110 "qmljs.g" - -case 76: { +case 79: { AST::ObjectLiteral *node = 0; if (sym(2).Node) node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(), @@ -727,9 +613,7 @@ case 76: { sym(1).Node = node; } break; -#line 1125 "qmljs.g" - -case 77: { +case 80: { AST::ObjectLiteral *node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); @@ -737,89 +621,67 @@ case 77: { sym(1).Node = node; } break; -#line 1136 "qmljs.g" - -case 78: { +case 81: { AST::NestedExpression *node = makeAstNode<AST::NestedExpression>(driver->nodePool(), sym(2).Expression); node->lparenToken = loc(1); node->rparenToken = loc(3); sym(1).Node = node; } break; -#line 1146 "qmljs.g" - -case 79: { +case 82: { AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -#line 1155 "qmljs.g" - -case 80: { +case 83: { AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval); node->identifierToken = loc(3); sym(1).Node = node; } break; -#line 1164 "qmljs.g" - -case 81: { +case 84: { sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), (AST::Elision *) 0, sym(1).Expression); } break; -#line 1171 "qmljs.g" - -case 82: { +case 85: { sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).Elision->finish(), sym(2).Expression); } break; -#line 1178 "qmljs.g" - -case 83: { +case 86: { AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList, (AST::Elision *) 0, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 1188 "qmljs.g" - -case 84: { +case 87: { AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList, sym(3).Elision->finish(), sym(4).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 1198 "qmljs.g" - -case 85: { +case 88: { AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool()); node->commaToken = loc(1); sym(1).Node = node; } break; -#line 1207 "qmljs.g" - -case 86: { +case 89: { AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool(), sym(1).Elision); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 1216 "qmljs.g" - -case 87: { +case 90: { AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(), sym(1).PropertyName, sym(3).Expression); node->colonToken = loc(2); sym(1).Node = node; } break; -#line 1226 "qmljs.g" - -case 88: { +case 91: { AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(), sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression); node->commaToken = loc(2); @@ -827,196 +689,116 @@ case 88: { sym(1).Node = node; } break; -#line 1237 "qmljs.g" - -case 89: { +case 92: { AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; - -#line 1246 "qmljs.g" -case 90: -#line 1249 "qmljs.g" - -case 91: { +case 93: +case 94: { AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -#line 1258 "qmljs.g" - -case 92: { +case 95: { AST::StringLiteralPropertyName *node = makeAstNode<AST::StringLiteralPropertyName> (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -#line 1267 "qmljs.g" - -case 93: { +case 96: { AST::NumericLiteralPropertyName *node = makeAstNode<AST::NumericLiteralPropertyName> (driver->nodePool(), sym(1).dval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -#line 1276 "qmljs.g" - -case 94: { +case 97: { AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -#line 1285 "qmljs.g" - -case 95: - -#line 1289 "qmljs.g" - -case 96: - -#line 1293 "qmljs.g" - -case 97: - -#line 1297 "qmljs.g" - case 98: -#line 1301 "qmljs.g" - case 99: -#line 1305 "qmljs.g" - case 100: -#line 1309 "qmljs.g" - case 101: -#line 1313 "qmljs.g" - case 102: -#line 1317 "qmljs.g" - case 103: -#line 1321 "qmljs.g" - case 104: -#line 1325 "qmljs.g" - case 105: -#line 1329 "qmljs.g" - case 106: -#line 1333 "qmljs.g" - case 107: -#line 1337 "qmljs.g" - case 108: -#line 1341 "qmljs.g" - case 109: -#line 1345 "qmljs.g" - case 110: -#line 1349 "qmljs.g" - case 111: -#line 1353 "qmljs.g" - case 112: -#line 1357 "qmljs.g" - case 113: -#line 1361 "qmljs.g" - case 114: -#line 1365 "qmljs.g" - case 115: -#line 1369 "qmljs.g" - case 116: -#line 1373 "qmljs.g" - case 117: -#line 1377 "qmljs.g" - case 118: -#line 1381 "qmljs.g" - case 119: -#line 1385 "qmljs.g" - case 120: -#line 1389 "qmljs.g" - case 121: -#line 1393 "qmljs.g" - case 122: -#line 1397 "qmljs.g" - case 123: -#line 1401 "qmljs.g" - case 124: -#line 1405 "qmljs.g" - case 125: + +case 126: + +case 127: + +case 128: { sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); } break; -#line 1419 "qmljs.g" - -case 130: { +case 133: { AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -#line 1429 "qmljs.g" - -case 131: { +case 134: { AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -#line 1439 "qmljs.g" - -case 132: { +case 135: { AST::NewMemberExpression *node = makeAstNode<AST::NewMemberExpression> (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList); node->newToken = loc(1); node->lparenToken = loc(3); @@ -1024,500 +806,384 @@ case 132: { sym(1).Node = node; } break; -#line 1452 "qmljs.g" - -case 134: { +case 137: { AST::NewExpression *node = makeAstNode<AST::NewExpression> (driver->nodePool(), sym(2).Expression); node->newToken = loc(1); sym(1).Node = node; } break; -#line 1461 "qmljs.g" - -case 135: { +case 138: { AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -#line 1471 "qmljs.g" - -case 136: { +case 139: { AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -#line 1481 "qmljs.g" - -case 137: { +case 140: { AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -#line 1491 "qmljs.g" - -case 138: { +case 141: { AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -#line 1501 "qmljs.g" - -case 139: { +case 142: { sym(1).Node = 0; } break; -#line 1508 "qmljs.g" - -case 140: { +case 143: { sym(1).Node = sym(1).ArgumentList->finish(); } break; -#line 1515 "qmljs.g" - -case 141: { +case 144: { sym(1).Node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).Expression); } break; -#line 1522 "qmljs.g" - -case 142: { +case 145: { AST::ArgumentList *node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 1535 "qmljs.g" - -case 146: { +case 149: { AST::PostIncrementExpression *node = makeAstNode<AST::PostIncrementExpression> (driver->nodePool(), sym(1).Expression); node->incrementToken = loc(2); sym(1).Node = node; } break; -#line 1544 "qmljs.g" - -case 147: { +case 150: { AST::PostDecrementExpression *node = makeAstNode<AST::PostDecrementExpression> (driver->nodePool(), sym(1).Expression); node->decrementToken = loc(2); sym(1).Node = node; } break; -#line 1555 "qmljs.g" - -case 149: { +case 152: { AST::DeleteExpression *node = makeAstNode<AST::DeleteExpression> (driver->nodePool(), sym(2).Expression); node->deleteToken = loc(1); sym(1).Node = node; } break; -#line 1564 "qmljs.g" - -case 150: { +case 153: { AST::VoidExpression *node = makeAstNode<AST::VoidExpression> (driver->nodePool(), sym(2).Expression); node->voidToken = loc(1); sym(1).Node = node; } break; -#line 1573 "qmljs.g" - -case 151: { +case 154: { AST::TypeOfExpression *node = makeAstNode<AST::TypeOfExpression> (driver->nodePool(), sym(2).Expression); node->typeofToken = loc(1); sym(1).Node = node; } break; -#line 1582 "qmljs.g" - -case 152: { +case 155: { AST::PreIncrementExpression *node = makeAstNode<AST::PreIncrementExpression> (driver->nodePool(), sym(2).Expression); node->incrementToken = loc(1); sym(1).Node = node; } break; -#line 1591 "qmljs.g" - -case 153: { +case 156: { AST::PreDecrementExpression *node = makeAstNode<AST::PreDecrementExpression> (driver->nodePool(), sym(2).Expression); node->decrementToken = loc(1); sym(1).Node = node; } break; -#line 1600 "qmljs.g" - -case 154: { +case 157: { AST::UnaryPlusExpression *node = makeAstNode<AST::UnaryPlusExpression> (driver->nodePool(), sym(2).Expression); node->plusToken = loc(1); sym(1).Node = node; } break; -#line 1609 "qmljs.g" - -case 155: { +case 158: { AST::UnaryMinusExpression *node = makeAstNode<AST::UnaryMinusExpression> (driver->nodePool(), sym(2).Expression); node->minusToken = loc(1); sym(1).Node = node; } break; -#line 1618 "qmljs.g" - -case 156: { +case 159: { AST::TildeExpression *node = makeAstNode<AST::TildeExpression> (driver->nodePool(), sym(2).Expression); node->tildeToken = loc(1); sym(1).Node = node; } break; -#line 1627 "qmljs.g" - -case 157: { +case 160: { AST::NotExpression *node = makeAstNode<AST::NotExpression> (driver->nodePool(), sym(2).Expression); node->notToken = loc(1); sym(1).Node = node; } break; -#line 1638 "qmljs.g" - -case 159: { +case 162: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Mul, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1648 "qmljs.g" - -case 160: { +case 163: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Div, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1658 "qmljs.g" - -case 161: { +case 164: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Mod, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1670 "qmljs.g" - -case 163: { +case 166: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Add, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1680 "qmljs.g" - -case 164: { +case 167: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Sub, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1692 "qmljs.g" - -case 166: { +case 169: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::LShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1702 "qmljs.g" - -case 167: { +case 170: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::RShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1712 "qmljs.g" - -case 168: { +case 171: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::URShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1724 "qmljs.g" - -case 170: { +case 173: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1734 "qmljs.g" - -case 171: { +case 174: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1744 "qmljs.g" - -case 172: { +case 175: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1754 "qmljs.g" - -case 173: { +case 176: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1764 "qmljs.g" - -case 174: { +case 177: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1774 "qmljs.g" - -case 175: { +case 178: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::In, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1786 "qmljs.g" - -case 177: { +case 180: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1796 "qmljs.g" - -case 178: { +case 181: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1806 "qmljs.g" - -case 179: { +case 182: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1816 "qmljs.g" - -case 180: { +case 183: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1826 "qmljs.g" - -case 181: { +case 184: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1838 "qmljs.g" - -case 183: { +case 186: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1848 "qmljs.g" - -case 184: { +case 187: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1858 "qmljs.g" - -case 185: { +case 188: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1868 "qmljs.g" - -case 186: { +case 189: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1880 "qmljs.g" - -case 188: { +case 191: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1890 "qmljs.g" - -case 189: { +case 192: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1900 "qmljs.g" - -case 190: { +case 193: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1910 "qmljs.g" - -case 191: { +case 194: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1922 "qmljs.g" - -case 193: { +case 196: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1934 "qmljs.g" - -case 195: { +case 198: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1946 "qmljs.g" - -case 197: { +case 200: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1958 "qmljs.g" - -case 199: { +case 202: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1970 "qmljs.g" - -case 201: { +case 204: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1982 "qmljs.g" - -case 203: { +case 206: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 1994 "qmljs.g" - -case 205: { +case 208: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2006 "qmljs.g" - -case 207: { +case 210: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2018 "qmljs.g" - -case 209: { +case 212: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Or, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2030 "qmljs.g" - -case 211: { +case 214: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, QSOperator::Or, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2042 "qmljs.g" - -case 213: { +case 216: { AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -1525,9 +1191,7 @@ case 213: { sym(1).Node = node; } break; -#line 2055 "qmljs.g" - -case 215: { +case 218: { AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -1535,160 +1199,112 @@ case 215: { sym(1).Node = node; } break; -#line 2068 "qmljs.g" - -case 217: { +case 220: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2080 "qmljs.g" - -case 219: { +case 222: { AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2090 "qmljs.g" - -case 220: { +case 223: { sym(1).ival = QSOperator::Assign; } break; -#line 2097 "qmljs.g" - -case 221: { +case 224: { sym(1).ival = QSOperator::InplaceMul; } break; -#line 2104 "qmljs.g" - -case 222: { +case 225: { sym(1).ival = QSOperator::InplaceDiv; } break; -#line 2111 "qmljs.g" - -case 223: { +case 226: { sym(1).ival = QSOperator::InplaceMod; } break; -#line 2118 "qmljs.g" - -case 224: { +case 227: { sym(1).ival = QSOperator::InplaceAdd; } break; -#line 2125 "qmljs.g" - -case 225: { +case 228: { sym(1).ival = QSOperator::InplaceSub; } break; -#line 2132 "qmljs.g" - -case 226: { +case 229: { sym(1).ival = QSOperator::InplaceLeftShift; } break; -#line 2139 "qmljs.g" - -case 227: { +case 230: { sym(1).ival = QSOperator::InplaceRightShift; } break; -#line 2146 "qmljs.g" - -case 228: { +case 231: { sym(1).ival = QSOperator::InplaceURightShift; } break; -#line 2153 "qmljs.g" - -case 229: { +case 232: { sym(1).ival = QSOperator::InplaceAnd; } break; -#line 2160 "qmljs.g" - -case 230: { +case 233: { sym(1).ival = QSOperator::InplaceXor; } break; -#line 2167 "qmljs.g" - -case 231: { +case 234: { sym(1).ival = QSOperator::InplaceOr; } break; -#line 2176 "qmljs.g" - -case 233: { +case 236: { AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 2185 "qmljs.g" - -case 234: { +case 237: { sym(1).Node = 0; } break; -#line 2196 "qmljs.g" - -case 237: { +case 240: { AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 2205 "qmljs.g" - -case 238: { +case 241: { sym(1).Node = 0; } break; -#line 2231 "qmljs.g" - -case 255: { +case 258: { AST::Block *node = makeAstNode<AST::Block> (driver->nodePool(), sym(2).StatementList); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -#line 2241 "qmljs.g" - -case 256: { +case 259: { sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).Statement); } break; -#line 2248 "qmljs.g" - -case 257: { +case 260: { sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).StatementList, sym(2).Statement); } break; -#line 2255 "qmljs.g" - -case 258: { +case 261: { sym(1).Node = 0; } break; -#line 2262 "qmljs.g" - -case 259: { +case 262: { sym(1).Node = sym(1).StatementList->finish (); } break; -#line 2270 "qmljs.g" - -case 261: { +case 264: { AST::VariableStatement *node = makeAstNode<AST::VariableStatement> (driver->nodePool(), sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST)); node->declarationKindToken = loc(1); @@ -1696,106 +1312,76 @@ case 261: { sym(1).Node = node; } break; -#line 2281 "qmljs.g" - -case 262: { +case 265: { sym(1).ival = T_CONST; } break; -#line 2288 "qmljs.g" - -case 263: { +case 266: { sym(1).ival = T_VAR; } break; -#line 2295 "qmljs.g" - -case 264: { +case 267: { sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration); } break; -#line 2302 "qmljs.g" - -case 265: { +case 268: { AST::VariableDeclarationList *node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 2312 "qmljs.g" - -case 266: { +case 269: { sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration); } break; -#line 2319 "qmljs.g" - -case 267: { +case 270: { sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); } break; -#line 2326 "qmljs.g" - -case 268: { +case 271: { AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -#line 2335 "qmljs.g" - -case 269: { +case 272: { AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -#line 2344 "qmljs.g" - -case 270: { +case 273: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -#line 2352 "qmljs.g" - -case 271: { +case 274: { sym(1).Node = 0; } break; -#line 2361 "qmljs.g" - -case 273: { +case 276: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -#line 2369 "qmljs.g" - -case 274: { +case 277: { sym(1).Node = 0; } break; -#line 2378 "qmljs.g" - -case 276: { +case 279: { AST::EmptyStatement *node = makeAstNode<AST::EmptyStatement> (driver->nodePool()); node->semicolonToken = loc(1); sym(1).Node = node; } break; -#line 2388 "qmljs.g" - -case 278: { +case 281: { AST::ExpressionStatement *node = makeAstNode<AST::ExpressionStatement> (driver->nodePool(), sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; -#line 2397 "qmljs.g" - -case 279: { +case 282: { AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1804,9 +1390,7 @@ case 279: { sym(1).Node = node; } break; -#line 2409 "qmljs.g" - -case 280: { +case 283: { AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1814,9 +1398,7 @@ case 280: { sym(1).Node = node; } break; -#line 2422 "qmljs.g" - -case 282: { +case 285: { AST::DoWhileStatement *node = makeAstNode<AST::DoWhileStatement> (driver->nodePool(), sym(2).Statement, sym(5).Expression); node->doToken = loc(1); node->whileToken = loc(3); @@ -1826,9 +1408,7 @@ case 282: { sym(1).Node = node; } break; -#line 2435 "qmljs.g" - -case 283: { +case 286: { AST::WhileStatement *node = makeAstNode<AST::WhileStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->whileToken = loc(1); node->lparenToken = loc(2); @@ -1836,9 +1416,7 @@ case 283: { sym(1).Node = node; } break; -#line 2446 "qmljs.g" - -case 284: { +case 287: { AST::ForStatement *node = makeAstNode<AST::ForStatement> (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Expression, sym(9).Statement); node->forToken = loc(1); @@ -1849,9 +1427,7 @@ case 284: { sym(1).Node = node; } break; -#line 2460 "qmljs.g" - -case 285: { +case 288: { AST::LocalForStatement *node = makeAstNode<AST::LocalForStatement> (driver->nodePool(), sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression, sym(8).Expression, sym(10).Statement); @@ -1864,9 +1440,7 @@ case 285: { sym(1).Node = node; } break; -#line 2476 "qmljs.g" - -case 286: { +case 289: { AST:: ForEachStatement *node = makeAstNode<AST::ForEachStatement> (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Statement); node->forToken = loc(1); @@ -1876,9 +1450,7 @@ case 286: { sym(1).Node = node; } break; -#line 2489 "qmljs.g" - -case 287: { +case 290: { AST::LocalForEachStatement *node = makeAstNode<AST::LocalForEachStatement> (driver->nodePool(), sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement); node->forToken = loc(1); @@ -1889,18 +1461,14 @@ case 287: { sym(1).Node = node; } break; -#line 2504 "qmljs.g" - -case 289: { +case 292: { AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool()); node->continueToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -#line 2515 "qmljs.g" - -case 291: { +case 294: { AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool(), sym(2).sval); node->continueToken = loc(1); node->identifierToken = loc(2); @@ -1908,18 +1476,14 @@ case 291: { sym(1).Node = node; } break; -#line 2527 "qmljs.g" - -case 293: { +case 296: { AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool()); node->breakToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -#line 2538 "qmljs.g" - -case 295: { +case 298: { AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool(), sym(2).sval); node->breakToken = loc(1); node->identifierToken = loc(2); @@ -1927,18 +1491,14 @@ case 295: { sym(1).Node = node; } break; -#line 2550 "qmljs.g" - -case 297: { +case 300: { AST::ReturnStatement *node = makeAstNode<AST::ReturnStatement> (driver->nodePool(), sym(2).Expression); node->returnToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -#line 2560 "qmljs.g" - -case 298: { +case 301: { AST::WithStatement *node = makeAstNode<AST::WithStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->withToken = loc(1); node->lparenToken = loc(2); @@ -1946,9 +1506,7 @@ case 298: { sym(1).Node = node; } break; -#line 2571 "qmljs.g" - -case 299: { +case 302: { AST::SwitchStatement *node = makeAstNode<AST::SwitchStatement> (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock); node->switchToken = loc(1); node->lparenToken = loc(2); @@ -1956,122 +1514,90 @@ case 299: { sym(1).Node = node; } break; -#line 2582 "qmljs.g" - -case 300: { +case 303: { AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -#line 2592 "qmljs.g" - -case 301: { +case 304: { AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(5); sym(1).Node = node; } break; -#line 2602 "qmljs.g" - -case 302: { +case 305: { sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClause); } break; -#line 2609 "qmljs.g" - -case 303: { +case 306: { sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause); } break; -#line 2616 "qmljs.g" - -case 304: { +case 307: { sym(1).Node = 0; } break; -#line 2623 "qmljs.g" - -case 305: { +case 308: { sym(1).Node = sym(1).CaseClauses->finish (); } break; -#line 2630 "qmljs.g" - -case 306: { +case 309: { AST::CaseClause *node = makeAstNode<AST::CaseClause> (driver->nodePool(), sym(2).Expression, sym(4).StatementList); node->caseToken = loc(1); node->colonToken = loc(3); sym(1).Node = node; } break; -#line 2640 "qmljs.g" - -case 307: { +case 310: { AST::DefaultClause *node = makeAstNode<AST::DefaultClause> (driver->nodePool(), sym(3).StatementList); node->defaultToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; - -#line 2650 "qmljs.g" -case 308: -#line 2653 "qmljs.g" - -case 309: { +case 311: +case 312: { AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -#line 2663 "qmljs.g" - -case 310: { +case 313: { AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), sym(1).sval, sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -#line 2674 "qmljs.g" - -case 312: { +case 315: { AST::ThrowStatement *node = makeAstNode<AST::ThrowStatement> (driver->nodePool(), sym(2).Expression); node->throwToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -#line 2684 "qmljs.g" - -case 313: { +case 316: { AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch); node->tryToken = loc(1); sym(1).Node = node; } break; -#line 2693 "qmljs.g" - -case 314: { +case 317: { AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -#line 2702 "qmljs.g" - -case 315: { +case 318: { AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -#line 2711 "qmljs.g" - -case 316: { +case 319: { AST::Catch *node = makeAstNode<AST::Catch> (driver->nodePool(), sym(3).sval, sym(5).Block); node->catchToken = loc(1); node->lparenToken = loc(2); @@ -2080,26 +1606,20 @@ case 316: { sym(1).Node = node; } break; -#line 2723 "qmljs.g" - -case 317: { +case 320: { AST::Finally *node = makeAstNode<AST::Finally> (driver->nodePool(), sym(2).Block); node->finallyToken = loc(1); sym(1).Node = node; } break; -#line 2733 "qmljs.g" - -case 319: { +case 322: { AST::DebuggerStatement *node = makeAstNode<AST::DebuggerStatement> (driver->nodePool()); node->debuggerToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -#line 2743 "qmljs.g" - -case 320: { +case 323: { AST::FunctionDeclaration *node = makeAstNode<AST::FunctionDeclaration> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -2110,9 +1630,7 @@ case 320: { sym(1).Node = node; } break; -#line 2757 "qmljs.g" - -case 321: { +case 324: { AST::FunctionExpression *node = makeAstNode<AST::FunctionExpression> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); if (sym(2).sval) @@ -2124,85 +1642,59 @@ case 321: { sym(1).Node = node; } break; -#line 2772 "qmljs.g" - -case 322: { +case 325: { AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -#line 2781 "qmljs.g" - -case 323: { +case 326: { AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval); node->commaToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -#line 2791 "qmljs.g" - -case 324: { +case 327: { sym(1).Node = 0; } break; -#line 2798 "qmljs.g" - -case 325: { +case 328: { sym(1).Node = sym(1).FormalParameterList->finish (); } break; -#line 2805 "qmljs.g" - -case 326: { +case 329: { sym(1).Node = 0; } break; -#line 2814 "qmljs.g" - -case 328: { +case 331: { sym(1).Node = makeAstNode<AST::FunctionBody> (driver->nodePool(), sym(1).SourceElements->finish ()); } break; -#line 2829 "qmljs.g" - -case 329: { +case 332: { sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElement); } break; -#line 2836 "qmljs.g" - -case 330: { +case 333: { sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement); } break; -#line 2843 "qmljs.g" - -case 331: { +case 334: { sym(1).Node = makeAstNode<AST::StatementSourceElement> (driver->nodePool(), sym(1).Statement); } break; -#line 2850 "qmljs.g" - -case 332: { +case 335: { sym(1).Node = makeAstNode<AST::FunctionSourceElement> (driver->nodePool(), sym(1).FunctionDeclaration); } break; -#line 2857 "qmljs.g" - -case 333: { +case 336: { sym(1).sval = 0; } break; -#line 2866 "qmljs.g" - -case 335: { +case 338: { sym(1).Node = 0; } break; -#line 2874 "qmljs.g" - } // switch action = nt_action(state_stack[tos], lhs[r] - TERMINAL_COUNT); } // if @@ -2293,7 +1785,8 @@ case 335: { } for (int tk = 1; tk < TERMINAL_COUNT; ++tk) { - if (tk == T_AUTOMATIC_SEMICOLON) + if (tk == T_AUTOMATIC_SEMICOLON || tk == T_FEED_UI_PROGRAM || + tk == T_FEED_JS_STATEMENT || tk == T_FEED_JS_EXPRESSION) continue; int a = t_action(errorState, tk); |