diff options
Diffstat (limited to 'src/declarative/qml/parser/qdeclarativejs.g')
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejs.g | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/declarative/qml/parser/qdeclarativejs.g index 2f89f8fa..b00f6bf7 100644 --- a/src/declarative/qml/parser/qdeclarativejs.g +++ b/src/declarative/qml/parser/qdeclarativejs.g @@ -61,6 +61,7 @@ %token T_RESERVED_WORD "reserved word" %token T_MULTILINE_STRING_LITERAL "multiline string literal" %token T_COMMENT "comment" +%token T_COMPATIBILITY_SEMICOLON --- context keywords. %token T_PUBLIC "public" @@ -124,7 +125,7 @@ ****************************************************************************/ #include <QtCore/QtDebug> -#include <QtGui/QApplication> +#include <QtWidgets/QApplication> #include <string.h> @@ -189,8 +190,15 @@ // // -// This file is automatically generated from qmljs.g. -// Changes will be lost. +// W A R N I N G +// ------------- +// +// This file is automatically generated from qdeclarativejs.g. +// Changes should be made to that file, not here. Any change to this file will +// be lost! +// +// To regenerate this file, run: +// qlalr --no-debug --no-lines --qt qdeclarativejs.g // #ifndef QDECLARATIVEJSPARSER_P_H @@ -376,13 +384,22 @@ protected: /. +// +// W A R N I N G +// ------------- +// +// This file is automatically generated from qdeclarativejs.g. +// Changes should be made to that file, not here. Any change to this file will +// be lost! +// +// To regenerate this file, run: +// qlalr --no-debug --no-lines --qt qdeclarativejs.g +// + #include "private/qdeclarativejsparser_p.h" #include <QVarLengthArray> -// -// This file is automatically generated from qmljs.g. -// Changes will be lost. -// +#include <stdlib.h> using namespace QDeclarativeJS; @@ -395,9 +412,9 @@ void Parser::reallocateStack() else stack_size <<= 1; - sym_stack = reinterpret_cast<Value*> (qRealloc(sym_stack, stack_size * sizeof(Value))); - state_stack = reinterpret_cast<int*> (qRealloc(state_stack, stack_size * sizeof(int))); - location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation))); + sym_stack = reinterpret_cast<Value*> (realloc(sym_stack, stack_size * sizeof(Value))); + state_stack = reinterpret_cast<int*> (realloc(state_stack, stack_size * sizeof(int))); + location_stack = reinterpret_cast<AST::SourceLocation*> (realloc(location_stack, stack_size * sizeof(AST::SourceLocation))); } inline static bool automatic(Engine *driver, int token) @@ -423,9 +440,9 @@ Parser::Parser(Engine *engine): Parser::~Parser() { if (stack_size) { - qFree(sym_stack); - qFree(state_stack); - qFree(location_stack); + free(sym_stack); + free(state_stack); + free(location_stack); } } @@ -2562,6 +2579,7 @@ case $rule_number: { IterationStatement: T_DO Statement T_WHILE T_LPAREN Expression T_RPAREN T_AUTOMATIC_SEMICOLON ; -- automatic semicolon +IterationStatement: T_DO Statement T_WHILE T_LPAREN Expression T_RPAREN T_COMPATIBILITY_SEMICOLON ; -- for JSC/V8 compatibility IterationStatement: T_DO Statement T_WHILE T_LPAREN Expression T_RPAREN T_SEMICOLON ; /. case $rule_number: { @@ -3024,7 +3042,8 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; const int errorState = state_stack[tos]; // automatic insertion of `;' - if (yytoken != -1 && t_action(errorState, T_AUTOMATIC_SEMICOLON) && automatic(driver, yytoken)) { + if (yytoken != -1 && ((t_action(errorState, T_AUTOMATIC_SEMICOLON) && automatic(driver, yytoken)) + || t_action(errorState, T_COMPATIBILITY_SEMICOLON))) { SavedToken &tk = token_buffer[0]; tk.token = yytoken; tk.dval = yylval; |