aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorAntti Piira <apiira@blackberry.com>2013-08-22 12:08:37 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-21 01:20:55 +0200
commit200a869441562d62e7fc0867599097e0599f0411 (patch)
tree982dc3c5a9c22bdea24a21054dd2b434fcea1147 /src/qml
parentb365471f0abc79f08bf0d852aea3be0a601c6901 (diff)
Add Singleton support for QML
This introduces Singleton support for QML (Composite Singleton). For now, the Singleton support is only availabe for QML types in modules or (remote and local) directories with qmldir file. However, in the future this support may be expanded to arbitrary QML file imports without by leaving out the qmldir requirement. You define a QML type as a Singleton with the following two steps: 1. By adding a pragma Singleton to a type's QML file: pragma Singleton The pragma and import statements can be mixed and their order does not matter. Singleton is the only supported pragma for now. Others will generate errors. 2. By specifying a qmldir file for the directory of your imported type and prepending the type with "singleton" keyword as follows: singleton TestTypeSingleton TestTypeSingleton.qml Alternatively you may specify a qmldir file for a module and specify your type as a singleton as follows: singleton TestTypeSingleton 1.0 TestTypeSingleton.qml Composite Singletons may be included in a module and may be used with a local namespace qualifier when imported with: "import xxx as NameSpace" A singleton instance is created at first use and stored into the QmlEngine (one instance per engine) and eventually released by the engine's destructor. CompositeSingletonType has a dual nature and will return true to both isComposite() and isSingleton() calls. In most cases its enough to check for just isComposite() or isSingleton(). However, there is a isCompositeSingleton() available as well. I used "qlalr --no-debug --no-lines --qt qqmljs.g" to generate the qqmljsparser and qqmljsgrammar files from qqmljs.g. Unit tests are included. Change-Id: I91b303612c5e132143b325b9a8f982e9355bc90e Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/compiler/qqmlcodegenerator.cpp9
-rw-r--r--src/qml/compiler/qqmlcodegenerator_p.h3
-rw-r--r--src/qml/compiler/qv4codegen.cpp14
-rw-r--r--src/qml/compiler/qv4codegen_p.h4
-rw-r--r--src/qml/parser/qqmljs.g84
-rw-r--r--src/qml/parser/qqmljsast.cpp24
-rw-r--r--src/qml/parser/qqmljsast_p.h160
-rw-r--r--src/qml/parser/qqmljsastfwd_p.h4
-rw-r--r--src/qml/parser/qqmljsastvisitor_p.h8
-rw-r--r--src/qml/parser/qqmljsgrammar.cpp1670
-rw-r--r--src/qml/parser/qqmljsgrammar_p.h43
-rw-r--r--src/qml/parser/qqmljskeywords_p.h11
-rw-r--r--src/qml/parser/qqmljsparser.cpp480
-rw-r--r--src/qml/parser/qqmljsparser_p.h9
-rw-r--r--src/qml/qml/qqmlcompiler.cpp14
-rw-r--r--src/qml/qml/qqmldirparser.cpp43
-rw-r--r--src/qml/qml/qqmldirparser_p.h5
-rw-r--r--src/qml/qml/qqmlimport.cpp101
-rw-r--r--src/qml/qml/qqmlimport_p.h8
-rw-r--r--src/qml/qml/qqmlmetatype.cpp87
-rw-r--r--src/qml/qml/qqmlmetatype_p.h11
-rw-r--r--src/qml/qml/qqmlprivate.h11
-rw-r--r--src/qml/qml/qqmlscript.cpp54
-rw-r--r--src/qml/qml/qqmlscript_p.h13
-rw-r--r--src/qml/qml/qqmltypeloader.cpp212
-rw-r--r--src/qml/qml/qqmltypeloader_p.h6
-rw-r--r--src/qml/qml/qqmltypenamecache.cpp35
-rw-r--r--src/qml/qml/qqmltypenamecache_p.h23
28 files changed, 1932 insertions, 1214 deletions
diff --git a/src/qml/compiler/qqmlcodegenerator.cpp b/src/qml/compiler/qqmlcodegenerator.cpp
index 381f5bfec9..804604affc 100644
--- a/src/qml/compiler/qqmlcodegenerator.cpp
+++ b/src/qml/compiler/qqmlcodegenerator.cpp
@@ -128,7 +128,7 @@ bool QQmlCodeGenerator::generateFromQml(const QString &code, const QUrl &url, co
sourceCode = code;
- accept(program->imports);
+ accept(program->headers);
if (program->members->next) {
QQmlError error;
@@ -241,7 +241,7 @@ bool QQmlCodeGenerator::visit(AST::UiArrayBinding *node)
return false;
}
-bool QQmlCodeGenerator::visit(AST::UiImportList *list)
+bool QQmlCodeGenerator::visit(AST::UiHeaderItemList *list)
{
return AST::Visitor::visit(list);
}
@@ -418,6 +418,11 @@ bool QQmlCodeGenerator::visit(AST::UiImport *node)
return false;
}
+bool QQmlCodeGenerator::visit(AST::UiPragma *ast)
+{
+ return true;
+}
+
static QStringList astNodeToStringList(QQmlJS::AST::Node *node)
{
if (node->kind == QQmlJS::AST::Node::Kind_IdentifierExpression) {
diff --git a/src/qml/compiler/qqmlcodegenerator_p.h b/src/qml/compiler/qqmlcodegenerator_p.h
index c3a3a8e4c3..9273892d7c 100644
--- a/src/qml/compiler/qqmlcodegenerator_p.h
+++ b/src/qml/compiler/qqmlcodegenerator_p.h
@@ -188,7 +188,8 @@ public:
virtual bool visit(AST::UiArrayMemberList *ast);
virtual bool visit(AST::UiImport *ast);
- virtual bool visit(AST::UiImportList *ast);
+ virtual bool visit(AST::UiPragma *ast);
+ virtual bool visit(AST::UiHeaderItemList *ast);
virtual bool visit(AST::UiObjectInitializer *ast);
virtual bool visit(AST::UiObjectMemberList *ast);
virtual bool visit(AST::UiParameterList *ast);
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 303d001246..a4da5ce116 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -937,7 +937,13 @@ bool Codegen::visit(UiImport *)
return false;
}
-bool Codegen::visit(UiImportList *)
+bool Codegen::visit(UiHeaderItemList *)
+{
+ assert(!"unreachable");
+ return false;
+}
+
+bool Codegen::visit(UiPragma *)
{
assert(!"unreachable");
return false;
@@ -973,6 +979,12 @@ bool Codegen::visit(UiQualifiedId *)
return false;
}
+bool Codegen::visit(UiQualifiedPragmaId *)
+{
+ assert(!"unreachable");
+ return false;
+}
+
bool Codegen::visit(VariableDeclaration *)
{
assert(!"unreachable");
diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h
index 3d5d92452b..d03f91b654 100644
--- a/src/qml/compiler/qv4codegen_p.h
+++ b/src/qml/compiler/qv4codegen_p.h
@@ -326,12 +326,14 @@ protected:
virtual bool visit(AST::StatementList *ast);
virtual bool visit(AST::UiArrayMemberList *ast);
virtual bool visit(AST::UiImport *ast);
- virtual bool visit(AST::UiImportList *ast);
+ virtual bool visit(AST::UiHeaderItemList *ast);
+ virtual bool visit(AST::UiPragma *ast);
virtual bool visit(AST::UiObjectInitializer *ast);
virtual bool visit(AST::UiObjectMemberList *ast);
virtual bool visit(AST::UiParameterList *ast);
virtual bool visit(AST::UiProgram *ast);
virtual bool visit(AST::UiQualifiedId *ast);
+ virtual bool visit(AST::UiQualifiedPragmaId *ast);
virtual bool visit(AST::VariableDeclaration *ast);
virtual bool visit(AST::VariableDeclarationList *ast);
diff --git a/src/qml/parser/qqmljs.g b/src/qml/parser/qqmljs.g
index 9476494105..8cc68e3643 100644
--- a/src/qml/parser/qqmljs.g
+++ b/src/qml/parser/qqmljs.g
@@ -65,6 +65,7 @@
--- context keywords.
%token T_PUBLIC "public"
%token T_IMPORT "import"
+%token T_PRAGMA "pragma"
%token T_AS "as"
%token T_ON "on"
%token T_GET "get"
@@ -253,7 +254,8 @@ public:
AST::VariableDeclarationList *VariableDeclarationList;
AST::UiProgram *UiProgram;
- AST::UiImportList *UiImportList;
+ AST::UiHeaderItemList *UiHeaderItemList;
+ AST::UiPragma *UiPragma;
AST::UiImport *UiImport;
AST::UiParameterList *UiParameterList;
AST::UiPublicMember *UiPublicMember;
@@ -266,6 +268,7 @@ public:
AST::UiObjectMemberList *UiObjectMemberList;
AST::UiArrayMemberList *UiArrayMemberList;
AST::UiQualifiedId *UiQualifiedId;
+ AST::UiQualifiedPragmaId *UiQualifiedPragmaId;
};
public:
@@ -347,6 +350,7 @@ protected:
{ return location_stack [tos + index - 1]; }
AST::UiQualifiedId *reparseAsQualifiedId(AST::ExpressionNode *expr);
+ AST::UiQualifiedPragmaId *reparseAsQualifiedPragmaId(AST::ExpressionNode *expr);
protected:
Engine *driver;
@@ -486,6 +490,19 @@ AST::UiQualifiedId *Parser::reparseAsQualifiedId(AST::ExpressionNode *expr)
return 0;
}
+AST::UiQualifiedPragmaId *Parser::reparseAsQualifiedPragmaId(AST::ExpressionNode *expr)
+{
+ if (AST::IdentifierExpression *idExpr = AST::cast<AST::IdentifierExpression *>(expr)) {
+ AST::UiQualifiedPragmaId *q = new (pool) AST::UiQualifiedPragmaId(idExpr->name);
+ q->identifierToken = idExpr->identifierToken;
+
+ return q->finish();
+ }
+
+ return 0;
+}
+
+
bool Parser::parse(int startToken)
{
Lexer *lexer = driver->lexer();
@@ -594,38 +611,62 @@ case $rule_number: {
} break;
./
-UiProgram: UiImportListOpt UiRootMember ;
+UiProgram: UiHeaderItemListOpt UiRootMember;
/.
case $rule_number: {
- sym(1).UiProgram = new (pool) AST::UiProgram(sym(1).UiImportList,
+ sym(1).UiProgram = new (pool) AST::UiProgram(sym(1).UiHeaderItemList,
sym(2).UiObjectMemberList->finish());
} break;
./
-UiImportListOpt: Empty ;
-UiImportListOpt: UiImportList ;
+UiHeaderItemListOpt: Empty ;
+UiHeaderItemListOpt: UiHeaderItemList ;
/.
case $rule_number: {
- sym(1).Node = sym(1).UiImportList->finish();
+ sym(1).Node = sym(1).UiHeaderItemList->finish();
} break;
./
-UiImportList: UiImport ;
+UiHeaderItemList: UiPragma ;
/.
case $rule_number: {
- sym(1).Node = new (pool) AST::UiImportList(sym(1).UiImport);
+ sym(1).Node = new (pool) AST::UiHeaderItemList(sym(1).UiPragma);
} break;
./
-UiImportList: UiImportList UiImport ;
+UiHeaderItemList: UiImport ;
/.
case $rule_number: {
- sym(1).Node = new (pool) AST::UiImportList(sym(1).UiImportList, sym(2).UiImport);
+ sym(1).Node = new (pool) AST::UiHeaderItemList(sym(1).UiImport);
} break;
./
+UiHeaderItemList: UiHeaderItemList UiPragma ;
+/.
+case $rule_number: {
+ sym(1).Node = new (pool) AST::UiHeaderItemList(sym(1).UiHeaderItemList, sym(2).UiPragma);
+} break;
+./
+
+UiHeaderItemList: UiHeaderItemList UiImport ;
+/.
+case $rule_number: {
+ sym(1).Node = new (pool) AST::UiHeaderItemList(sym(1).UiHeaderItemList, sym(2).UiImport);
+} break;
+./
+
+PragmaId: MemberExpression ;
+
ImportId: MemberExpression ;
+UiPragma: UiPragmaHead T_AUTOMATIC_SEMICOLON ;
+UiPragma: UiPragmaHead T_SEMICOLON ;
+/.
+case $rule_number: {
+ sym(1).UiPragma->semicolonToken = loc(2);
+} break;
+./
+
UiImport: UiImportHead T_AUTOMATIC_SEMICOLON ;
UiImport: UiImportHead T_SEMICOLON ;
/.
@@ -666,6 +707,28 @@ case $rule_number: {
} break;
./
+UiPragmaHead: T_PRAGMA PragmaId ;
+/.
+case $rule_number: {
+ AST::UiPragma *node = 0;
+
+ if (AST::UiQualifiedPragmaId *qualifiedId = reparseAsQualifiedPragmaId(sym(2).Expression)) {
+ node = new (pool) AST::UiPragma(qualifiedId);
+ }
+
+ sym(1).Node = node;
+
+ if (node) {
+ node->pragmaToken = loc(1);
+ } else {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1),
+ QLatin1String("Expected a qualified name id")));
+
+ return false; // ### remove me
+ }
+} break;
+./
+
UiImportHead: T_IMPORT ImportId ;
/.
@@ -1261,6 +1324,7 @@ case $rule_number: {
} break;
./
+
UiQualifiedId: MemberExpression ;
/.
case $rule_number: {
diff --git a/src/qml/parser/qqmljsast.cpp b/src/qml/parser/qqmljsast.cpp
index ea0df4a537..33b3868e66 100644
--- a/src/qml/parser/qqmljsast.cpp
+++ b/src/qml/parser/qqmljsast.cpp
@@ -821,7 +821,7 @@ void DebuggerStatement::accept0(Visitor *visitor)
void UiProgram::accept0(Visitor *visitor)
{
if (visitor->visit(this)) {
- accept(imports, visitor);
+ accept(headers, visitor);
accept(members, visitor);
}
@@ -932,16 +932,34 @@ void UiImport::accept0(Visitor *visitor)
visitor->endVisit(this);
}
-void UiImportList::accept0(Visitor *visitor)
+void UiQualifiedPragmaId::accept0(Visitor *visitor)
{
if (visitor->visit(this)) {
- accept(import, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiPragma::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(pragmaType, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiHeaderItemList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(headerItem, visitor);
accept(next, visitor);
}
visitor->endVisit(this);
}
+
void UiSourceElement::accept0(Visitor *visitor)
{
if (visitor->visit(this)) {
diff --git a/src/qml/parser/qqmljsast_p.h b/src/qml/parser/qqmljsast_p.h
index 01a872f1e8..6cc3b7649e 100644
--- a/src/qml/parser/qqmljsast_p.h
+++ b/src/qml/parser/qqmljsast_p.h
@@ -207,18 +207,20 @@ public:
Kind_UiArrayBinding,
Kind_UiImport,
- Kind_UiImportList,
Kind_UiObjectBinding,
Kind_UiObjectDefinition,
Kind_UiObjectInitializer,
Kind_UiObjectMemberList,
Kind_UiArrayMemberList,
+ Kind_UiPragma,
Kind_UiProgram,
Kind_UiParameterList,
Kind_UiPublicMember,
Kind_UiQualifiedId,
+ Kind_UiQualifiedPragmaId,
Kind_UiScriptBinding,
- Kind_UiSourceElement
+ Kind_UiSourceElement,
+ Kind_UiHeaderItemList
};
inline Node()
@@ -2271,27 +2273,72 @@ public:
SourceLocation semicolonToken;
};
-class QML_PARSER_EXPORT UiImportList: public Node
+class QML_PARSER_EXPORT UiObjectMember: public Node
{
public:
- QQMLJS_DECLARE_AST_NODE(UiImportList)
+ virtual SourceLocation firstSourceLocation() const = 0;
+ virtual SourceLocation lastSourceLocation() const = 0;
- UiImportList(UiImport *import)
- : import(import),
- next(this)
+ virtual UiObjectMember *uiObjectMemberCast();
+};
+
+class QML_PARSER_EXPORT UiObjectMemberList: public Node
+{
+public:
+ QQMLJS_DECLARE_AST_NODE(UiObjectMemberList)
+
+ UiObjectMemberList(UiObjectMember *member)
+ : next(this), member(member)
{ kind = K; }
- UiImportList(UiImportList *previous, UiImport *import)
- : import(import)
+ UiObjectMemberList(UiObjectMemberList *previous, UiObjectMember *member)
+ : member(member)
{
kind = K;
next = previous->next;
previous->next = this;
}
- UiImportList *finish()
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return member->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return next ? next->lastSourceLocation() : member->lastSourceLocation(); }
+
+ UiObjectMemberList *finish()
{
- UiImportList *head = next;
+ UiObjectMemberList *head = next;
+ next = 0;
+ return head;
+ }
+
+// attributes
+ UiObjectMemberList *next;
+ UiObjectMember *member;
+};
+
+class QML_PARSER_EXPORT UiQualifiedPragmaId: public Node
+{
+public:
+ QQMLJS_DECLARE_AST_NODE(UiQualifiedPragmaId)
+
+ UiQualifiedPragmaId(const QStringRef &name)
+ : next(this), name(name)
+ { kind = K; }
+
+ UiQualifiedPragmaId(UiQualifiedPragmaId *previous, const QStringRef &name)
+ : name(name)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ UiQualifiedPragmaId *finish()
+ {
+ UiQualifiedPragmaId *head = next;
next = 0;
return head;
}
@@ -2299,60 +2346,87 @@ public:
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
- { return import->firstSourceLocation(); }
+ { return identifierToken; }
virtual SourceLocation lastSourceLocation() const
- { return next ? next->lastSourceLocation() : import->lastSourceLocation(); }
+ { return next ? next->lastSourceLocation() : identifierToken; }
// attributes
- UiImport *import;
- UiImportList *next;
+ UiQualifiedPragmaId *next;
+ QStringRef name;
+ SourceLocation identifierToken;
};
-class QML_PARSER_EXPORT UiObjectMember: public Node
+class QML_PARSER_EXPORT UiPragma: public Node
{
public:
- virtual SourceLocation firstSourceLocation() const = 0;
- virtual SourceLocation lastSourceLocation() const = 0;
+ QQMLJS_DECLARE_AST_NODE(UiPragma)
- virtual UiObjectMember *uiObjectMemberCast();
+ UiPragma(UiQualifiedPragmaId *type)
+ : pragmaType(type)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return pragmaToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ UiQualifiedPragmaId *pragmaType;
+ SourceLocation pragmaToken;
+ SourceLocation semicolonToken;
};
-class QML_PARSER_EXPORT UiObjectMemberList: public Node
+class QML_PARSER_EXPORT UiHeaderItemList: public Node
{
public:
- QQMLJS_DECLARE_AST_NODE(UiObjectMemberList)
+ QQMLJS_DECLARE_AST_NODE(UiHeaderItemList)
- UiObjectMemberList(UiObjectMember *member)
- : next(this), member(member)
+ UiHeaderItemList(UiImport *import)
+ : headerItem(import), next(this)
{ kind = K; }
- UiObjectMemberList(UiObjectMemberList *previous, UiObjectMember *member)
- : member(member)
+ UiHeaderItemList(UiPragma *pragma)
+ : headerItem(pragma), next(this)
+ { kind = K; }
+
+ UiHeaderItemList(UiHeaderItemList *previous, UiImport *import)
+ : headerItem(import)
{
kind = K;
next = previous->next;
previous->next = this;
}
- virtual void accept0(Visitor *visitor);
-
- virtual SourceLocation firstSourceLocation() const
- { return member->firstSourceLocation(); }
-
- virtual SourceLocation lastSourceLocation() const
- { return next ? next->lastSourceLocation() : member->lastSourceLocation(); }
+ UiHeaderItemList(UiHeaderItemList *previous, UiPragma *pragma)
+ : headerItem(pragma)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
- UiObjectMemberList *finish()
+ UiHeaderItemList *finish()
{
- UiObjectMemberList *head = next;
+ UiHeaderItemList *head = next;
next = 0;
return head;
}
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return headerItem->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return next ? next->lastSourceLocation() : headerItem->lastSourceLocation(); }
+
// attributes
- UiObjectMemberList *next;
- UiObjectMember *member;
+ Node *headerItem;
+ UiHeaderItemList *next;
};
class QML_PARSER_EXPORT UiProgram: public Node
@@ -2360,16 +2434,16 @@ class QML_PARSER_EXPORT UiProgram: public Node
public:
QQMLJS_DECLARE_AST_NODE(UiProgram)
- UiProgram(UiImportList *imports, UiObjectMemberList *members)
- : imports(imports), members(members)
+ UiProgram(UiHeaderItemList *headers, UiObjectMemberList *members)
+ : headers(headers), members(members)
{ kind = K; }
virtual void accept0(Visitor *visitor);
virtual SourceLocation firstSourceLocation() const
{
- if (imports)
- return imports->firstSourceLocation();
+ if (headers)
+ return headers->firstSourceLocation();
else if (members)
return members->firstSourceLocation();
return SourceLocation();
@@ -2379,13 +2453,13 @@ public:
{
if (members)
return members->lastSourceLocation();
- else if (imports)
- return imports->lastSourceLocation();
+ else if (headers)
+ return headers->lastSourceLocation();
return SourceLocation();
}
// attributes
- UiImportList *imports;
+ UiHeaderItemList *headers;
UiObjectMemberList *members;
};
diff --git a/src/qml/parser/qqmljsastfwd_p.h b/src/qml/parser/qqmljsastfwd_p.h
index fe5572c4b2..f8cba4981c 100644
--- a/src/qml/parser/qqmljsastfwd_p.h
+++ b/src/qml/parser/qqmljsastfwd_p.h
@@ -167,7 +167,7 @@ class NestedExpression;
// ui elements
class UiProgram;
-class UiImportList;
+class UiPragma;
class UiImport;
class UiPublicMember;
class UiParameterList;
@@ -181,6 +181,8 @@ class UiObjectMember;
class UiObjectMemberList;
class UiArrayMemberList;
class UiQualifiedId;
+class UiQualifiedPragmaId;
+class UiHeaderItemList;
} } // namespace AST
diff --git a/src/qml/parser/qqmljsastvisitor_p.h b/src/qml/parser/qqmljsastvisitor_p.h
index ef022f617c..1d67d4c75d 100644
--- a/src/qml/parser/qqmljsastvisitor_p.h
+++ b/src/qml/parser/qqmljsastvisitor_p.h
@@ -71,7 +71,8 @@ public:
// Ui
virtual bool visit(UiProgram *) { return true; }
- virtual bool visit(UiImportList *) { return true; }
+ virtual bool visit(UiHeaderItemList *) { return true; }
+ virtual bool visit(UiPragma *) { return true; }
virtual bool visit(UiImport *) { return true; }
virtual bool visit(UiPublicMember *) { return true; }
virtual bool visit(UiSourceElement *) { return true; }
@@ -84,10 +85,12 @@ public:
virtual bool visit(UiObjectMemberList *) { return true; }
virtual bool visit(UiArrayMemberList *) { return true; }
virtual bool visit(UiQualifiedId *) { return true; }
+ virtual bool visit(UiQualifiedPragmaId *) { return true; }
virtual void endVisit(UiProgram *) {}
- virtual void endVisit(UiImportList *) {}
virtual void endVisit(UiImport *) {}
+ virtual void endVisit(UiHeaderItemList *) {}
+ virtual void endVisit(UiPragma *) {}
virtual void endVisit(UiPublicMember *) {}
virtual void endVisit(UiSourceElement *) {}
virtual void endVisit(UiObjectDefinition *) {}
@@ -99,6 +102,7 @@ public:
virtual void endVisit(UiObjectMemberList *) {}
virtual void endVisit(UiArrayMemberList *) {}
virtual void endVisit(UiQualifiedId *) {}
+ virtual void endVisit(UiQualifiedPragmaId *) {}
// QQmlJS
virtual bool visit(ThisExpression *) { return true; }
diff --git a/src/qml/parser/qqmljsgrammar.cpp b/src/qml/parser/qqmljsgrammar.cpp
index 4a5672a796..1e5f7a8c6d 100644
--- a/src/qml/parser/qqmljsgrammar.cpp
+++ b/src/qml/parser/qqmljsgrammar.cpp
@@ -54,421 +54,427 @@ const char *const QQmlJSGrammar::spell [] = {
")", ";", 0, "*", "*=", "string literal", "property", "signal", "readonly", "switch",
"this", "throw", "~", "try", "typeof", "var", "void", "while", "with", "^",
"^=", "null", "true", "false", "const", "debugger", "reserved word", "multiline string literal", "comment", 0,
- "public", "import", "as", "on", "get", "set", 0, 0, 0, 0,
- 0, 0, 0, 0, 0};
+ "public", "import", "pragma", "as", "on", "get", "set", 0, 0, 0,
+ 0, 0, 0, 0, 0, 0};
const short QQmlJSGrammar::lhs [] = {
- 105, 105, 105, 105, 105, 105, 106, 112, 112, 115,
- 115, 117, 116, 116, 116, 116, 116, 116, 116, 116,
- 119, 114, 113, 122, 122, 123, 123, 124, 124, 121,
- 110, 110, 110, 110, 126, 126, 126, 126, 126, 126,
- 126, 110, 134, 134, 134, 135, 135, 136, 136, 110,
- 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
- 110, 110, 110, 110, 110, 110, 120, 120, 120, 120,
- 120, 120, 120, 139, 139, 139, 139, 139, 139, 139,
- 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
- 139, 125, 141, 141, 141, 141, 140, 140, 145, 145,
- 145, 143, 143, 146, 146, 146, 146, 149, 149, 149,
- 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
- 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
- 149, 149, 149, 149, 149, 149, 149, 149, 150, 150,
- 118, 118, 118, 118, 118, 153, 153, 154, 154, 154,
- 154, 152, 152, 155, 155, 156, 156, 157, 157, 157,
- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- 159, 159, 159, 159, 160, 160, 160, 161, 161, 161,
- 161, 162, 162, 162, 162, 162, 162, 162, 163, 163,
- 163, 163, 163, 163, 164, 164, 164, 164, 164, 165,
- 165, 165, 165, 165, 166, 166, 167, 167, 168, 168,
- 169, 169, 170, 170, 171, 171, 172, 172, 173, 173,
- 174, 174, 175, 175, 176, 176, 177, 177, 144, 144,
- 178, 178, 179, 179, 179, 179, 179, 179, 179, 179,
- 179, 179, 179, 179, 108, 108, 180, 180, 181, 181,
- 182, 182, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 107, 127, 191, 191,
- 190, 190, 138, 138, 192, 192, 193, 193, 195, 195,
- 194, 196, 199, 197, 197, 200, 198, 198, 128, 129,
- 129, 130, 130, 183, 183, 183, 183, 183, 183, 183,
- 183, 184, 184, 184, 184, 185, 185, 185, 185, 186,
- 186, 131, 132, 201, 201, 204, 204, 202, 202, 205,
- 203, 187, 188, 188, 133, 133, 133, 206, 207, 189,
- 189, 208, 137, 151, 151, 209, 209, 148, 148, 147,
- 147, 210, 111, 111, 211, 211, 109, 109, 142, 142,
- 212};
+ 106, 106, 106, 106, 106, 106, 107, 113, 113, 116,
+ 116, 116, 116, 119, 121, 117, 117, 118, 118, 118,
+ 118, 118, 118, 118, 118, 122, 123, 115, 114, 126,
+ 126, 127, 127, 128, 128, 125, 111, 111, 111, 111,
+ 130, 130, 130, 130, 130, 130, 130, 111, 138, 138,
+ 138, 139, 139, 140, 140, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 124, 124, 124, 124, 124, 124, 124, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 129, 145, 145,
+ 145, 145, 144, 144, 149, 149, 149, 147, 147, 150,
+ 150, 150, 150, 153, 153, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 154, 154, 120, 120, 120, 120,
+ 120, 157, 157, 158, 158, 158, 158, 156, 156, 159,
+ 159, 160, 160, 161, 161, 161, 162, 162, 162, 162,
+ 162, 162, 162, 162, 162, 162, 163, 163, 163, 163,
+ 164, 164, 164, 165, 165, 165, 165, 166, 166, 166,
+ 166, 166, 166, 166, 167, 167, 167, 167, 167, 167,
+ 168, 168, 168, 168, 168, 169, 169, 169, 169, 169,
+ 170, 170, 171, 171, 172, 172, 173, 173, 174, 174,
+ 175, 175, 176, 176, 177, 177, 178, 178, 179, 179,
+ 180, 180, 181, 181, 148, 148, 182, 182, 183, 183,
+ 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
+ 109, 109, 184, 184, 185, 185, 186, 186, 108, 108,
+ 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
+ 108, 108, 108, 131, 195, 195, 194, 194, 142, 142,
+ 196, 196, 197, 197, 199, 199, 198, 200, 203, 201,
+ 201, 204, 202, 202, 132, 133, 133, 134, 134, 187,
+ 187, 187, 187, 187, 187, 187, 187, 188, 188, 188,
+ 188, 189, 189, 189, 189, 190, 190, 135, 136, 205,
+ 205, 208, 208, 206, 206, 209, 207, 191, 192, 192,
+ 137, 137, 137, 210, 211, 193, 193, 212, 141, 155,
+ 155, 213, 213, 152, 152, 151, 151, 214, 112, 112,
+ 215, 215, 110, 110, 146, 146, 216};
const short QQmlJSGrammar::rhs [] = {
2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
- 2, 1, 2, 2, 3, 3, 5, 5, 4, 4,
- 2, 0, 1, 1, 2, 1, 3, 2, 3, 2,
- 1, 5, 4, 4, 1, 1, 1, 1, 1, 1,
- 1, 3, 1, 1, 1, 0, 1, 2, 4, 6,
- 6, 3, 3, 7, 7, 4, 4, 5, 5, 5,
- 6, 6, 10, 6, 1, 1, 1, 1, 1, 1,
+ 1, 2, 2, 1, 1, 2, 2, 2, 2, 3,
+ 3, 5, 5, 4, 4, 2, 2, 0, 1, 1,
+ 2, 1, 3, 2, 3, 2, 1, 5, 4, 4,
+ 1, 1, 1, 1, 1, 1, 1, 3, 1, 1,
+ 1, 0, 1, 2, 4, 6, 6, 3, 3, 7,
+ 7, 4, 4, 5, 5, 5, 6, 6, 10, 6,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 2, 3, 3, 4, 5, 3, 4,
- 3, 1, 1, 2, 3, 4, 1, 2, 3, 7,
- 8, 1, 3, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 3, 3, 4, 5, 3, 4, 3, 1, 1, 2,
+ 3, 4, 1, 2, 3, 7, 8, 1, 3, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 4, 3, 5, 1, 2, 4, 4, 4,
- 3, 0, 1, 1, 3, 1, 1, 1, 2, 2,
- 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 1, 3, 3, 3, 1, 3, 3, 1, 3, 3,
- 3, 1, 3, 3, 3, 3, 3, 3, 1, 3,
- 3, 3, 3, 3, 1, 3, 3, 3, 3, 1,
- 3, 3, 3, 3, 1, 3, 1, 3, 1, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 4, 3,
+ 5, 1, 2, 4, 4, 4, 3, 0, 1, 1,
+ 3, 1, 1, 1, 2, 2, 1, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 3, 3, 3,
+ 1, 3, 3, 1, 3, 3, 3, 1, 3, 3,
+ 3, 3, 3, 3, 1, 3, 3, 3, 3, 3,
+ 1, 3, 3, 3, 3, 1, 3, 3, 3, 3,
1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
- 1, 3, 1, 3, 1, 5, 1, 5, 1, 3,
- 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 3, 0, 1, 1, 3,
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 1, 2,
- 0, 1, 3, 3, 1, 1, 1, 3, 1, 3,
- 2, 2, 2, 0, 1, 2, 0, 1, 1, 2,
- 2, 7, 5, 7, 7, 7, 5, 9, 10, 7,
- 8, 2, 2, 3, 3, 2, 2, 3, 3, 3,
- 3, 5, 5, 3, 5, 1, 2, 0, 1, 4,
- 3, 3, 3, 3, 3, 3, 4, 5, 2, 2,
- 2, 1, 8, 8, 7, 1, 3, 0, 1, 0,
- 1, 1, 1, 1, 1, 2, 1, 1, 0, 1,
- 2};
+ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
+ 1, 5, 1, 5, 1, 3, 1, 3, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 0, 1, 1, 3, 0, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 1, 2, 0, 1, 3, 3,
+ 1, 1, 1, 3, 1, 3, 2, 2, 2, 0,
+ 1, 2, 0, 1, 1, 2, 2, 7, 5, 7,
+ 7, 7, 5, 9, 10, 7, 8, 2, 2, 3,
+ 3, 2, 2, 3, 3, 3, 3, 5, 5, 3,
+ 5, 1, 2, 0, 1, 4, 3, 3, 3, 3,
+ 3, 3, 4, 5, 2, 2, 2, 1, 8, 8,
+ 7, 1, 3, 0, 1, 0, 1, 1, 1, 1,
+ 1, 2, 1, 1, 0, 1, 2};
const short QQmlJSGrammar::action_default [] = {
- 0, 0, 22, 0, 0, 0, 22, 0, 178, 245,
- 209, 217, 213, 157, 229, 205, 3, 142, 75, 158,
- 221, 225, 146, 175, 156, 161, 141, 195, 182, 0,
- 82, 83, 78, 0, 72, 67, 349, 0, 0, 0,
- 0, 80, 0, 0, 76, 79, 71, 0, 0, 68,
- 70, 73, 69, 81, 74, 0, 77, 0, 0, 171,
- 0, 0, 158, 177, 160, 159, 0, 0, 0, 173,
- 174, 172, 176, 0, 206, 0, 0, 0, 0, 196,
- 0, 0, 0, 0, 0, 0, 186, 0, 0, 0,
- 180, 181, 179, 184, 188, 187, 185, 183, 198, 197,
- 199, 0, 214, 0, 210, 0, 0, 152, 139, 151,
- 140, 108, 109, 110, 135, 111, 136, 112, 113, 114,
- 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
- 137, 125, 126, 127, 128, 129, 130, 131, 132, 133,
- 134, 138, 0, 0, 150, 246, 153, 0, 154, 0,
- 155, 149, 0, 242, 235, 233, 240, 241, 239, 238,
- 244, 237, 236, 234, 243, 230, 0, 218, 0, 0,
- 222, 0, 0, 226, 0, 0, 152, 144, 0, 143,
- 0, 148, 162, 0, 338, 338, 339, 0, 336, 0,
- 337, 0, 340, 253, 260, 259, 267, 255, 0, 256,
- 0, 341, 0, 348, 257, 258, 75, 263, 261, 345,
- 342, 347, 264, 0, 275, 0, 0, 0, 0, 332,
- 0, 349, 247, 289, 0, 0, 0, 276, 0, 0,
- 265, 266, 0, 254, 262, 290, 291, 0, 338, 0,
- 0, 340, 0, 333, 334, 0, 322, 346, 0, 306,
- 307, 308, 309, 0, 302, 303, 304, 305, 330, 331,
- 0, 0, 0, 0, 0, 294, 295, 296, 251, 249,
- 211, 219, 215, 231, 207, 252, 0, 158, 223, 227,
- 200, 189, 0, 0, 208, 0, 0, 0, 0, 201,
- 0, 0, 0, 0, 0, 193, 191, 194, 192, 190,
- 203, 202, 204, 0, 216, 0, 212, 0, 250, 158,
- 0, 232, 247, 248, 0, 247, 0, 0, 298, 0,
- 0, 0, 300, 0, 220, 0, 0, 224, 0, 0,
- 228, 287, 0, 279, 288, 282, 0, 286, 0, 247,
- 280, 0, 247, 0, 0, 299, 0, 0, 0, 301,
- 0, 0, 0, 293, 0, 292, 75, 102, 350, 0,
- 0, 107, 269, 272, 0, 108, 275, 111, 136, 113,
- 114, 78, 118, 119, 72, 120, 123, 76, 79, 247,
- 73, 81, 126, 74, 128, 77, 130, 131, 276, 133,
- 134, 138, 0, 104, 103, 106, 90, 105, 89, 0,
- 99, 270, 268, 0, 0, 0, 340, 0, 100, 146,
- 147, 152, 0, 145, 0, 310, 311, 0, 338, 0,
- 0, 340, 0, 101, 0, 0, 0, 313, 318, 316,
- 319, 0, 0, 317, 318, 0, 314, 0, 315, 271,
- 321, 0, 271, 320, 0, 323, 324, 0, 271, 325,
- 326, 0, 0, 327, 0, 0, 0, 328, 329, 164,
- 163, 0, 0, 0, 297, 0, 0, 0, 312, 284,
- 277, 0, 285, 281, 0, 283, 273, 0, 274, 278,
- 0, 0, 340, 0, 335, 93, 0, 0, 97, 84,
- 0, 86, 95, 0, 87, 96, 98, 88, 94, 85,
- 0, 91, 168, 166, 170, 167, 165, 169, 343, 6,
- 344, 4, 2, 65, 92, 0, 0, 68, 70, 69,
- 31, 5, 0, 66, 0, 45, 44, 43, 0, 0,
- 58, 0, 59, 35, 36, 37, 38, 40, 41, 62,
- 39, 0, 45, 0, 0, 0, 0, 0, 54, 0,
- 55, 0, 0, 26, 0, 0, 63, 27, 0, 30,
- 28, 24, 0, 29, 25, 0, 56, 0, 57, 146,
- 0, 60, 64, 0, 0, 0, 0, 61, 0, 52,
- 46, 53, 47, 0, 0, 0, 0, 49, 0, 50,
- 51, 48, 0, 0, 146, 271, 0, 0, 42, 75,
- 108, 275, 111, 136, 113, 114, 78, 118, 119, 120,
- 123, 76, 79, 247, 81, 126, 74, 128, 77, 130,
- 131, 276, 133, 134, 138, 0, 32, 33, 0, 34,
- 8, 0, 10, 0, 9, 0, 1, 21, 12, 0,
- 13, 0, 14, 0, 19, 20, 0, 15, 16, 0,
- 17, 18, 11, 23, 7, 351};
+ 0, 0, 28, 0, 0, 0, 28, 0, 184, 251,
+ 215, 223, 219, 163, 235, 211, 3, 148, 81, 164,
+ 227, 231, 152, 181, 162, 167, 147, 201, 188, 0,
+ 88, 89, 84, 0, 78, 73, 355, 0, 0, 0,
+ 0, 86, 0, 0, 82, 85, 77, 0, 0, 74,
+ 76, 79, 75, 87, 80, 0, 83, 0, 0, 177,
+ 0, 0, 164, 183, 166, 165, 0, 0, 0, 179,
+ 180, 178, 182, 0, 212, 0, 0, 0, 0, 202,
+ 0, 0, 0, 0, 0, 0, 192, 0, 0, 0,
+ 186, 187, 185, 190, 194, 193, 191, 189, 204, 203,
+ 205, 0, 220, 0, 216, 0, 0, 158, 145, 157,
+ 146, 114, 115, 116, 141, 117, 142, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 143, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, 144, 0, 0, 156, 252, 159, 0, 160, 0,
+ 161, 155, 0, 248, 241, 239, 246, 247, 245, 244,
+ 250, 243, 242, 240, 249, 236, 0, 224, 0, 0,
+ 228, 0, 0, 232, 0, 0, 158, 150, 0, 149,
+ 0, 154, 168, 0, 344, 344, 345, 0, 342, 0,
+ 343, 0, 346, 259, 266, 265, 273, 261, 0, 262,
+ 0, 347, 0, 354, 263, 264, 81, 269, 267, 351,
+ 348, 353, 270, 0, 281, 0, 0, 0, 0, 338,
+ 0, 355, 253, 295, 0, 0, 0, 282, 0, 0,
+ 271, 272, 0, 260, 268, 296, 297, 0, 344, 0,
+ 0, 346, 0, 339, 340, 0, 328, 352, 0, 312,
+ 313, 314, 315, 0, 308, 309, 310, 311, 336, 337,
+ 0, 0, 0, 0, 0, 300, 301, 302, 257, 255,
+ 217, 225, 221, 237, 213, 258, 0, 164, 229, 233,
+ 206, 195, 0, 0, 214, 0, 0, 0, 0, 207,
+ 0, 0, 0, 0, 0, 199, 197, 200, 198, 196,
+ 209, 208, 210, 0, 222, 0, 218, 0, 256, 164,
+ 0, 238, 253, 254, 0, 253, 0, 0, 304, 0,
+ 0, 0, 306, 0, 226, 0, 0, 230, 0, 0,
+ 234, 293, 0, 285, 294, 288, 0, 292, 0, 253,
+ 286, 0, 253, 0, 0, 305, 0, 0, 0, 307,
+ 0, 0, 0, 299, 0, 298, 81, 108, 356, 0,
+ 0, 113, 275, 278, 0, 114, 281, 117, 142, 119,
+ 120, 84, 124, 125, 78, 126, 129, 82, 85, 253,
+ 79, 87, 132, 80, 134, 83, 136, 137, 282, 139,
+ 140, 144, 0, 110, 109, 112, 96, 111, 95, 0,
+ 105, 276, 274, 0, 0, 0, 346, 0, 106, 152,
+ 153, 158, 0, 151, 0, 316, 317, 0, 344, 0,
+ 0, 346, 0, 107, 0, 0, 0, 319, 324, 322,
+ 325, 0, 0, 323, 324, 0, 320, 0, 321, 277,
+ 327, 0, 277, 326, 0, 329, 330, 0, 277, 331,
+ 332, 0, 0, 333, 0, 0, 0, 334, 335, 170,
+ 169, 0, 0, 0, 303, 0, 0, 0, 318, 290,
+ 283, 0, 291, 287, 0, 289, 279, 0, 280, 284,
+ 0, 0, 346, 0, 341, 99, 0, 0, 103, 90,
+ 0, 92, 101, 0, 93, 102, 104, 94, 100, 91,
+ 0, 97, 174, 172, 176, 173, 171, 175, 349, 6,
+ 350, 4, 2, 71, 98, 0, 0, 74, 76, 75,
+ 37, 5, 0, 72, 0, 51, 50, 49, 0, 0,
+ 64, 0, 65, 41, 42, 43, 44, 46, 47, 68,
+ 45, 0, 51, 0, 0, 0, 0, 0, 60, 0,
+ 61, 0, 0, 32, 0, 0, 69, 33, 0, 36,
+ 34, 30, 0, 35, 31, 0, 62, 0, 63, 152,
+ 0, 66, 70, 0, 0, 0, 0, 67, 0, 58,
+ 52, 59, 53, 0, 0, 0, 0, 55, 0, 56,
+ 57, 54, 0, 0, 152, 277, 0, 0, 48, 81,
+ 114, 281, 117, 142, 119, 120, 84, 124, 125, 126,
+ 129, 82, 85, 253, 87, 132, 80, 134, 83, 136,
+ 137, 282, 139, 140, 144, 0, 38, 39, 0, 40,
+ 8, 0, 0, 9, 0, 11, 0, 10, 0, 1,
+ 27, 15, 14, 26, 13, 12, 29, 7, 0, 18,
+ 0, 19, 0, 24, 25, 0, 20, 21, 0, 22,
+ 23, 16, 17, 357};
const short QQmlJSGrammar::goto_default [] = {
- 7, 636, 211, 198, 209, 521, 509, 635, 654, 508,
- 634, 632, 637, 22, 633, 18, 520, 562, 552, 559,
- 554, 539, 193, 197, 199, 204, 234, 212, 231, 543,
- 583, 582, 203, 233, 26, 487, 486, 359, 358, 9,
- 357, 360, 202, 480, 361, 109, 17, 147, 24, 13,
- 146, 19, 25, 59, 23, 8, 28, 27, 280, 15,
- 274, 10, 270, 12, 272, 11, 271, 20, 278, 21,
- 279, 14, 273, 269, 310, 414, 275, 276, 205, 195,
- 194, 208, 207, 230, 196, 364, 363, 232, 471, 470,
- 332, 333, 473, 335, 472, 334, 427, 431, 434, 430,
- 429, 449, 450, 200, 186, 201, 210, 0};
+ 7, 639, 211, 198, 209, 521, 509, 634, 647, 508,
+ 633, 637, 635, 643, 22, 640, 638, 636, 18, 520,
+ 562, 552, 559, 554, 539, 193, 197, 199, 204, 234,
+ 212, 231, 543, 583, 582, 203, 233, 26, 487, 486,
+ 359, 358, 9, 357, 360, 202, 480, 361, 109, 17,
+ 147, 24, 13, 146, 19, 25, 59, 23, 8, 28,
+ 27, 280, 15, 274, 10, 270, 12, 272, 11, 271,
+ 20, 278, 21, 279, 14, 273, 269, 310, 414, 275,
+ 276, 205, 195, 194, 208, 207, 230, 196, 364, 363,
+ 232, 471, 470, 332, 333, 473, 335, 472, 334, 427,
+ 431, 434, 430, 429, 449, 450, 200, 186, 201, 210,
+ 0};
const short QQmlJSGrammar::action_index [] = {
- 235, 1289, 2663, 2663, 2562, 1005, 64, 90, 103, -105,
- 88, 94, 79, 173, -105, 302, 69, -105, -105, 724,
- 65, 135, 195, 239, -105, -105, -105, 367, 278, 1289,
- -105, -105, -105, 485, -105, -105, 2360, 1772, 1289, 1289,
- 1289, -105, 817, 1289, -105, -105, -105, 1289, 1289, -105,
- -105, -105, -105, -105, -105, 1289, -105, 1289, 1289, -105,
- 1289, 1289, 95, 207, -105, -105, 1289, 1289, 1289, -105,
- -105, -105, 202, 1289, 300, 1289, 1289, 1289, 1289, 377,
- 1289, 1289, 1289, 1289, 1289, 1289, 253, 1289, 1289, 1289,
- 151, 147, 129, 196, 170, 199, 279, 270, 470, 470,
- 387, 1289, 53, 1289, 80, 2158, 1289, 1289, -105, -105,
- -105, -105, -105, -105, -105, -105, -105, -105, -105, -105,
- -105, -105, -105, -105, -105, -105, -105, -105, -105, -105,
- -105, -105, -105, -105, -105, -105, -105, -105, -105, -105,
- -105, -105, 128, 1289, -105, -105, 74, 52, -105, 1289,
- -105, -105, 1289, -105, -105, -105, -105, -105, -105, -105,
- -105, -105, -105, -105, -105, -105, 1289, 51, 1289, 1289,
- 77, 66, 1289, -105, 2158, 1289, 1289, -105, 125, -105,
- 48, -105, -105, 47, 451, 374, 83, 87, -105, 397,
- -105, 62, 2663, -105, -105, -105, -105, -105, 205, -105,
- 415, -105, 68, -105, -105, -105, 86, -105, -105, -105,
- 2663, -105, -105, 622, -105, 576, 102, 2562, 75, 89,
- 81, 2865, 1289, -105, 70, 1289, 63, -105, 92, 93,
- -105, -105, 546, -105, -105, -105, -105, 91, 546, 40,
- 45, 2663, 49, -105, -105, 2562, -105, -105, 106, -105,
- -105, -105, -105, 121, -105, -105, -105, -105, -105, -105,
- 42, 44, 1289, 114, 222, -105, -105, -105, 1481, -105,
- 84, 57, 56, -105, 388, 78, 54, 682, 82, 99,
- 357, 247, 546, 1289, 295, 1289, 1289, 1289, 1289, 334,
- 1289, 1289, 1289, 1289, 1289, 203, 217, 244, 263, 211,
- 341, 319, 351, 1289, 56, 1289, 73, 1289, -105, 724,
- 1289, -105, 1289, 67, 46, 1289, 61, 2562, -105, 1289,
- 136, 2562, -105, 1289, 76, 1289, 1289, 85, 59, 1289,
- -105, 71, 133, 72, -105, -105, 1289, -105, 546, 1289,
- -105, -53, 1289, -60, 2562, -105, 1289, 143, 2562, -105,
- 1289, 132, 2562, 8, 2562, -105, 7, -105, 12, -37,
- 107, -105, -105, 2562, -33, 622, 22, 555, 115, 1289,
- 2562, 23, -13, 502, 2259, -10, 817, 18, 6, 1387,
- 2259, 0, 9, -6, 1289, -4, -23, 1289, 5, 1289,
- -25, -27, 2461, -105, -105, -105, -105, -105, -105, 1289,
- -105, -105, -105, -3, -1, 21, 2663, 1, -105, 218,
- -105, 1289, 4, -105, 111, -105, -105, 26, 466, 16,
- 38, 2663, 39, -105, 1289, 110, 37, -105, 55, -105,
- 60, 116, 1289, -105, 58, 43, -105, -15, -105, 2562,
- -105, 123, 2562, -105, 154, -105, -105, 96, 2562, 32,
- -105, 3, 14, -105, 546, -11, 13, -105, -105, -105,
- -105, 1289, 126, 2562, -105, 1289, 130, 2562, -105, 15,
- -105, 301, -105, -105, 1289, -105, -105, 546, -105, -105,
- -45, -12, 2663, -24, -105, -105, 204, 1578, -105, -105,
- 1869, -105, -105, 1675, -105, -105, -105, -105, -105, -105,
- 101, -105, -105, -105, -105, -105, -105, -105, -105, -105,
- 2663, -105, -105, -105, 105, 2, 910, 206, -47, -2,
- -105, -105, 246, -105, 214, -105, -105, -105, 364, 232,
- -105, 1963, -105, -105, -105, -105, -105, -105, -105, -105,
- -105, 191, 24, 394, 172, -18, 384, 215, -105, -30,
- -105, 910, 149, -105, -16, 910, -105, -105, 1100, -105,
- -105, -105, 1195, -105, -105, 225, -105, 1963, -105, 316,
- -17, -105, -105, 269, 418, -5, 1963, -105, 184, -105,
- 175, -105, 20, -9, 546, 182, 469, -105, 104, -105,
- -105, -105, 2057, 910, 292, 2764, 1772, 10, -105, 35,
- 622, 34, 525, 98, 1289, 2562, 50, 17, 536, 19,
- 817, 31, 27, 1387, 28, 9, 29, 1289, 30, 11,
- 1289, 41, 1289, 33, 36, 137, -105, -105, 25, -105,
- -105, 910, -105, 268, -86, 910, -105, -105, 141, 546,
- -105, 156, -105, 117, -105, -105, 546, -105, -105, 138,
- -105, -105, -105, -105, -105, -105,
+ 239, 1406, 2692, 2692, 2794, 1119, 115, 29, 168, -106,
+ 26, -23, -60, 225, -106, 306, 33, -106, -106, 732,
+ -2, 145, 243, 223, -106, -106, -106, 379, 227, 1406,
+ -106, -106, -106, 539, -106, -106, 2488, 1698, 1406, 1406,
+ 1406, -106, 1023, 1406, -106, -106, -106, 1406, 1406, -106,
+ -106, -106, -106, -106, -106, 1406, -106, 1406, 1406, -106,
+ 1406, 1406, 114, 206, -106, -106, 1406, 1406, 1406, -106,
+ -106, -106, 211, 1406, 302, 1406, 1406, 1406, 1406, 369,
+ 1406, 1406, 1406, 1406, 1406, 1406, 226, 1406, 1406, 1406,
+ 135, 151, 110, 257, 279, 276, 256, 222, 475, 475,
+ 475, 1406, 7, 1406, 57, 2284, 1406, 1406, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, 136, 1406, -106, -106, 30, -24, -106, 1406,
+ -106, -106, 1406, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, 1406, 2, 1406, 1406,
+ 10, 97, 1406, -106, 2284, 1406, 1406, -106, 141, -106,
+ -45, -106, -106, 4, 457, 386, 89, 79, -106, 448,
+ -106, 74, 2692, -106, -106, -106, -106, -106, 164, -106,
+ 460, -106, 85, -106, -106, -106, 96, -106, -106, -106,
+ 2692, -106, -106, 547, -106, 629, 143, 2794, 62, 54,
+ 43, 2998, 1406, -106, 51, 1406, 52, -106, 47, 45,
+ -106, -106, 454, -106, -106, -106, -106, 64, 352, 31,
+ 61, 2692, 27, -106, -106, 2794, -106, -106, 139, -106,
+ -106, -106, -106, 126, -106, -106, -106, -106, -106, -106,
+ -6, 25, 1406, 130, 159, -106, -106, -106, 1600, -106,
+ 68, 65, 5, -106, 308, 60, 3, 835, 99, 105,
+ 337, 207, 408, 1406, 317, 1406, 1406, 1406, 1406, 353,
+ 1406, 1406, 1406, 1406, 1406, 186, 203, 204, 212, 219,
+ 333, 343, 359, 1406, 20, 1406, 202, 1406, -106, 732,
+ 1406, -106, 1406, 81, 72, 1406, 77, 2794, -106, 1406,
+ 149, 2794, -106, 1406, 80, 1406, 1406, 94, 88, 1406,
+ -106, -8, 128, -25, -106, -106, 1406, -106, 471, 1406,
+ -106, -53, 1406, -56, 2794, -106, 1406, 134, 2794, -106,
+ 1406, 138, 2794, -5, 2794, -106, -4, -106, 9, -9,
+ 37, -106, -106, 2794, -12, 555, 32, 629, 123, 1406,
+ 2794, 41, 18, 504, 2386, 21, 1023, 49, 46, 1505,
+ 2386, 42, 16, 44, 1406, 24, -10, 1406, 17, 1406,
+ -15, -18, 2590, -106, -106, -106, -106, -106, -106, 1406,
+ -106, -106, -106, -1, -26, -3, 2692, -27, -106, 277,
+ -106, 1406, -28, -106, 90, -106, -106, 1, 552, -40,
+ -11, 2692, -29, -106, 1406, 117, 14, -106, 50, -106,
+ 40, 119, 1406, -106, 11, 35, -106, -54, -106, 2794,
+ -106, 116, 2794, -106, 267, -106, -106, 121, 2794, -7,
+ -106, -31, -19, -106, 376, 6, 78, -106, -106, -106,
+ -106, 1406, 98, 2794, -106, 1406, 106, 2794, -106, 76,
+ -106, 254, -106, -106, 1406, -106, -106, 552, -106, -106,
+ 71, 75, 2692, 67, -106, -106, 122, 1992, -106, -106,
+ 1796, -106, -106, 1894, -106, -106, -106, -106, -106, -106,
+ 113, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ 2692, -106, -106, -106, 111, 22, 929, 152, 39, 48,
+ -106, -106, 301, -106, 147, -106, -106, -106, 468, 155,
+ -106, 2182, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, 178, -30, 463, 181, -14, 400, 229, -106, -32,
+ -106, 929, 104, -106, 0, 929, -106, -106, 1311, -106,
+ -106, -106, 1215, -106, -106, 248, -106, 2182, -106, 392,
+ 59, -106, -106, 244, 552, 73, 2182, -106, 236, -106,
+ 237, -106, 70, 15, 368, 214, 355, -106, 103, -106,
+ -106, -106, 2087, 721, 392, 2896, 1698, 34, -106, 56,
+ 598, 55, 629, 107, 1406, 2794, 53, 23, 544, 36,
+ 1023, 58, 66, 1505, 69, 38, 63, 1406, 95, 84,
+ 1406, 102, 1406, 83, 82, 124, -106, -106, 87, -106,
+ -106, 929, 813, 91, 929, -106, 271, -106, 86, -106,
+ -106, 100, 101, -106, -106, -106, -106, -106, 552, -106,
+ 209, -106, 109, -106, -106, 552, -106, -106, 92, -106,
+ -106, -106, -106, -106,
- -108, 0, 79, 128, 132, 301, 2, -108, -108, -108,
- -108, -108, -108, -108, -108, -108, -108, -108, -108, -47,
- -108, -108, -108, -108, -108, -108, -108, -108, -108, 51,
- -108, -108, -108, -3, -108, -108, 8, -23, 12, 78,
- 106, -108, 69, 74, -108, -108, -108, 195, 204, -108,
- -108, -108, -108, -108, -108, 188, -108, 201, 200, -108,
- 127, 129, -108, -108, -108, -108, 140, 137, 133, -108,
- -108, -108, -108, 146, -108, 177, 168, 170, 167, -108,
- 144, 152, 166, 158, 160, 131, -108, 194, 187, 207,
- -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
- -108, 88, -108, 112, -108, 121, 90, -38, -108, -108,
- -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
- -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
- -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
- -108, -108, -108, 32, -108, -108, -108, -108, -108, 26,
- -108, -108, 27, -108, -108, -108, -108, -108, -108, -108,
- -108, -108, -108, -108, -108, -108, 102, -108, 103, 41,
- -108, -108, 37, -108, 250, 38, 83, -108, -108, -108,
- -108, -108, -108, -108, 42, 126, -108, -108, -108, 40,
- -108, -108, 43, -108, -108, -108, -108, -108, -108, -108,
- 39, -108, -108, -108, -108, -108, -108, -108, -108, -108,
- 225, -108, -108, 30, -108, 24, -108, 211, -108, 55,
- -108, 77, 60, -108, -108, 66, 34, -108, -108, -108,
- -108, -108, -8, -108, -108, -108, -108, -108, 153, -108,
- -108, 164, -108, -108, -108, 241, -108, -108, -108, -108,
- -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
- -108, -108, 11, -108, -108, -108, -108, -108, 179, -108,
- -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
- -108, -108, 19, 259, -108, 255, 228, 240, 246, -108,
- 52, 63, 67, 65, 50, -108, -108, -108, -108, -108,
- -108, -108, -108, 210, -108, 256, -108, 226, -108, -108,
- 252, -108, 161, -108, -108, 268, -108, 197, -108, 5,
- -108, 218, -108, 222, -108, 213, 249, -108, -108, 236,
- -108, -108, -108, -108, -108, -108, 212, -108, 80, 87,
- -108, -108, 86, -108, 98, -108, 61, -108, 245, -108,
- 59, -108, 208, -108, 192, -108, -108, -108, -108, -108,
- -108, -108, -108, 257, -108, 33, -108, 28, -108, 73,
- 71, -108, -108, 36, 57, -108, 62, -108, -108, 46,
- 70, -108, -108, -108, 49, -108, 45, 99, -108, 84,
- -108, -108, 100, -108, -108, -108, -108, -108, -108, 21,
- -108, -108, -108, -108, -108, -108, 118, -108, -108, -108,
- -108, 81, -108, -108, -108, -108, -108, -108, 123, -108,
- -108, 134, -108, -108, 56, -108, -108, -108, -108, -108,
- -58, -108, 47, -108, -57, -108, -108, -108, -108, 265,
- -108, -108, 374, -108, -108, -108, -108, -108, 94, -66,
- -108, -108, 25, -108, 22, -108, 31, -108, -108, -108,
- -108, 58, -108, 229, -108, 35, -108, 235, -108, -108,
- -108, -108, -108, -108, 29, -108, -108, 186, -108, -108,
- -108, -108, 162, -108, -108, -108, -108, 48, -108, -108,
- 163, -108, -108, 44, -108, -108, -108, -108, -108, -108,
- -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
- 141, -108, -108, -108, -108, -108, -7, -108, -108, -108,
- -108, -108, -108, -108, -19, -108, -108, -108, -6, -108,
- -108, 334, -108, -108, -108, -108, -108, -108, -108, -108,
- -108, -108, -108, -15, -27, -108, -10, -108, -108, -108,
- -108, 159, -108, -108, -108, 176, -108, -108, 319, -108,
- -108, -108, 322, -108, -108, -108, -108, 469, -108, -108,
- 10, -108, -108, 6, 16, -108, 342, -108, -108, -108,
- 17, -108, -108, -108, 15, 3, 9, -108, -108, -108,
- -108, -108, 358, 68, -108, 82, 310, 1, -108, -108,
- -2, -108, 7, -108, 54, 76, -108, -108, 4, -108,
- 64, -108, -108, 23, -108, -108, -108, 18, -108, -5,
- 95, -108, 91, -108, -108, -108, -108, -108, -1, -108,
- -108, 20, -108, -108, 14, 142, -108, -108, -108, 13,
- -108, -108, -108, -108, -108, -108, -11, -108, -108, -108,
- -108, -108, -108, -108, -108, -108};
+ -111, 43, 59, 70, 71, 369, 40, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, 21,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, 79,
+ -111, -111, -111, -16, -111, -111, 5, -26, 23, 73,
+ 91, -111, 83, 61, -111, -111, -111, 88, 87, -111,
+ -111, -111, -111, -111, -111, 29, -111, 66, 39, -111,
+ 97, 193, -111, -111, -111, -111, 160, 180, 183, -111,
+ -111, -111, -111, 176, -111, 167, 151, 155, 152, -111,
+ 148, 187, 195, 197, 199, 201, -111, 186, 92, 194,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, 103, -111, 108, -111, 181, -2, -42, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, 34, -111, -111, -111, -111, -111, 3,
+ -111, -111, 10, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, 127, -111, 109, 15,
+ -111, -111, 16, -111, 225, 44, 128, -111, -111, -111,
+ -111, -111, -111, -111, 25, 157, -111, -111, -111, 26,
+ -111, -111, 24, -111, -111, -111, -111, -111, -111, -111,
+ 22, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ 179, -111, -111, 45, -111, 46, -111, 107, -111, 48,
+ -111, 106, 62, -111, -111, 163, -3, -111, -111, -111,
+ -111, -111, -14, -111, -111, -111, -111, -111, 57, -111,
+ -111, 224, -111, -111, -111, 227, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, 35, -111, -111, -111, -111, -111, 72, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, 12, 264, -111, 258, 246, 254, 209, -111,
+ 60, 51, 52, 27, 53, -111, -111, -111, -111, -111,
+ -111, -111, -111, 244, -111, 255, -111, 203, -111, -111,
+ 207, -111, 217, -111, -111, 198, -111, 208, -111, 8,
+ -111, 215, -111, 232, -111, 233, 234, -111, -111, 223,
+ -111, -111, -111, -111, -111, -111, 230, -111, 95, 113,
+ -111, -111, 153, -111, 156, -111, 2, -111, 147, -111,
+ 58, -111, 137, -111, 100, -111, -111, -111, -111, -111,
+ -111, -111, -111, 135, -111, 41, -111, 54, -111, 117,
+ 162, -111, -111, 50, 169, -111, 174, -111, -111, 32,
+ 178, -111, -111, -111, 31, -111, 7, 144, -111, 130,
+ -111, -111, 142, -111, -111, -111, -111, -111, -111, 11,
+ -111, -111, -111, -111, -111, -111, 214, -111, -111, -111,
+ -111, 140, -111, -111, -111, -111, -111, -111, 158, -111,
+ -111, 149, -111, -111, 47, -111, -111, -111, -111, -111,
+ -55, -111, 38, -111, -67, -111, -111, -111, -111, 263,
+ -111, -111, 262, -111, -111, -111, -111, -111, 190, -76,
+ -111, -111, 30, -111, 19, -111, 14, -111, -111, -111,
+ -111, 33, -111, 272, -111, 64, -111, 175, -111, -111,
+ -111, -111, -111, -111, 18, -111, -111, 69, -111, -111,
+ -111, -111, 114, -111, -111, -111, -111, 20, -111, -111,
+ 110, -111, -111, 28, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ 86, -111, -111, -111, -111, -111, 55, -111, -111, -111,
+ -111, -111, -111, -111, -7, -111, -111, -111, 1, -111,
+ -111, 329, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, 0, -11, -111, -10, -111, -111, -111,
+ -111, 204, -111, -111, -111, 205, -111, -111, 317, -111,
+ -111, -111, 311, -111, -111, -111, -111, 370, -111, -111,
+ -9, -111, -111, -4, -12, -111, 337, -111, -111, -111,
+ -18, -111, -111, -111, -1, -17, -6, -111, -111, -111,
+ -111, -111, 466, 78, -111, 82, 307, -13, -111, -111,
+ -8, -111, 6, -111, 74, 76, -111, -111, 9, -111,
+ 85, -111, -111, 17, -111, -111, -111, 4, -111, -22,
+ 84, -111, 67, -111, -111, -111, -111, -111, 49, -111,
+ -111, 37, 42, 68, 77, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, 13, -111,
+ -111, -111, -111, -111, -111, 36, -111, -111, -111, -111,
+ -111, -111, -111, -111};
const short QQmlJSGrammar::action_info [] = {
- 344, -127, 576, -129, 551, 631, 546, -105, 342, 465,
- 448, 461, -132, -106, 245, 481, 558, 558, 398, 573,
- 392, 482, 402, 268, 354, -124, 350, 578, 585, -135,
- -116, 484, 474, 404, -106, -105, -127, -129, -124, 454,
- 438, -135, 245, 558, 448, 424, 448, 448, -132, 456,
- 439, 588, 452, 268, 406, 350, 408, -116, 558, 405,
- 432, 544, 418, 432, 413, 432, 329, 166, 524, 461,
- 428, 421, 465, 172, 283, 143, 420, 143, 241, 166,
- 262, 73, 149, 185, 323, 283, 307, 323, 336, 73,
- 655, 189, 0, 245, 423, 192, 448, 0, 0, 101,
- 240, 0, 451, 346, 243, 303, 424, 315, 181, 143,
- 0, 268, 151, 0, 399, 312, 452, 350, 143, 261,
- 174, 317, 143, 244, 303, 184, 435, 238, 461, 465,
- 442, 143, 103, 143, 143, 305, 143, 64, 143, 175,
- 143, 338, 101, 60, 143, 555, 0, 191, 65, 325,
- 0, 143, 0, 326, 61, 631, 174, 555, 103, 259,
- 258, 501, 143, 259, 258, 590, 589, 252, 251, 60,
- 426, 436, 416, 415, 264, 175, 259, 258, 645, 644,
- 61, 179, 257, 256, 144, 168, 463, 60, 105, 169,
- 467, 60, 352, 626, 339, 87, 321, 88, 61, 651,
- 650, 525, 61, 348, 525, 556, 174, 106, 89, 107,
- 174, 525, 490, 143, 66, 446, 445, 648, 647, 66,
- 580, 87, 549, 88, 87, 175, 88, 411, 87, 175,
- 88, 176, 567, 174, 89, 542, 87, 89, 88, 531,
- 0, 89, 87, 525, 88, 581, 579, 527, 646, 89,
- 527, 66, 175, 592, 411, 89, 0, 527, 526, 67,
- 491, 526, 0, 0, 67, 68, 236, 235, 526, 87,
- 68, 88, 87, 0, 88, 0, 550, 548, 87, 558,
- 88, 527, 89, 267, 265, 89, 568, 566, 87, 527,
- 88, 89, 526, 532, 530, 87, 67, 88, 525, 0,
- 526, 89, 68, 87, 87, 88, 88, 174, 89, 477,
- 0, 266, 0, 285, 286, 641, 89, 89, 75, 76,
- 75, 76, 0, 0, 0, -92, 175, 0, 176, 642,
- 640, 174, 6, 5, 4, 1, 3, 2, 0, 593,
- 287, 288, 290, 291, 527, 77, 78, 77, 78, -92,
- 175, 292, 176, 0, 293, 526, 294, 290, 291, 0,
- 639, 0, 478, 476, 290, 291, 292, 0, 0, 293,
- 0, 294, 0, 292, 290, 291, 293, 0, 294, 0,
- 290, 291, 0, 292, 0, 0, 293, 0, 294, 292,
- 80, 81, 293, 35, 294, 0, 0, 0, 82, 83,
- 80, 81, 84, 35, 85, 0, 285, 286, 82, 83,
- 80, 81, 84, 35, 85, 0, 0, 0, 82, 83,
- 0, 0, 84, 35, 85, 0, 35, 0, 0, 0,
- 49, 52, 50, 287, 288, 0, 0, 0, 0, 0,
- 49, 52, 50, 0, 35, 0, 0, 35, 0, 0,
- 49, 52, 50, 0, 0, 0, 0, 46, 34, 51,
- 49, 52, 50, 49, 52, 50, 0, 46, 34, 51,
- 0, 0, 0, 0, 0, 0, 0, 46, 34, 51,
- 35, 49, 52, 50, 49, 52, 50, 46, 34, 51,
- 46, 34, 51, 80, 81, 35, 0, 0, 35, 0,
- 0, 82, 83, 0, 0, 84, 0, 85, 46, 34,
- 51, 46, 34, 51, 35, 0, 0, 49, 52, 50,
- 0, 184, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 35, 49, 52, 50, 49, 52, 50, 184, 0,
- 0, 0, 0, 0, 46, 34, 51, 0, 0, 0,
- 0, 49, 52, 50, 35, 0, 0, 0, 0, 46,
- 34, 51, 46, 34, 51, 35, 0, 0, 49, 52,
- 50, 0, 184, 0, 0, 35, 0, 0, 46, 34,
- 51, 0, 0, 0, 35, 0, 255, 254, 0, 0,
- 0, 49, 52, 50, 0, 46, 34, 51, 0, 0,
- 0, 0, 49, 52, 50, 35, 0, 0, 0, 0,
- 0, 0, 49, 52, 50, 0, 255, 254, 46, 34,
- 51, 49, 52, 50, 0, 0, 0, 0, 0, 46,
- 34, 51, 0, 0, 0, 0, 0, 255, 254, 46,
- 34, 51, 49, 52, 50, 0, 0, 0, 46, 34,
- 51, 35, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 46,
- 34, 51, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 250, 249, 153, 0, 0, 49, 52,
- 50, 0, 0, 0, 0, 154, 0, 0, 0, 155,
- 0, 0, 0, 0, 0, 0, 0, 0, 156, 0,
- 157, 0, 0, 319, 0, 46, 34, 51, 0, 0,
- 0, 158, 0, 159, 64, 0, 0, 153, 0, 0,
- 0, 160, 0, 0, 161, 65, 0, 154, 0, 0,
- 162, 155, 0, 0, 0, 0, 163, 0, 0, 0,
- 156, 0, 157, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 164, 158, 0, 159, 64, 0, 0, 0,
- 0, 0, 0, 160, 0, 0, 161, 65, 0, 0,
- 0, 0, 162, 0, 0, 0, 0, 0, 163, 0,
+ 166, 438, 551, 245, 344, 454, 346, 544, 342, 336,
+ 546, 354, 166, 452, 448, 181, 432, 392, 465, 103,
+ 420, 461, 421, 448, -138, 101, 423, 73, 408, 663,
+ 406, -135, 413, 558, 405, 404, 151, 418, 149, -141,
+ 185, 143, 439, 402, 399, 432, 398, 428, -122, -111,
+ 101, -133, 424, -112, 268, 432, -130, 350, 73, 268,
+ -122, 262, -141, 245, 312, -130, 456, 558, 307, 283,
+ -133, 261, 350, -112, 424, 588, -111, 578, 585, 350,
+ 576, 465, 243, 461, 305, 448, 103, 424, 524, 143,
+ 184, 240, 558, 474, 241, 329, 323, 189, 268, 305,
+ 238, 323, -135, 245, 172, 573, 143, 192, 482, -138,
+ 0, 448, 555, 303, 143, 174, 174, 448, 465, 461,
+ 558, 143, 484, 442, 143, 143, 174, 451, 303, 435,
+ 490, 481, 555, 315, 175, 175, 338, 317, 143, 191,
+ 244, 452, 143, 0, 143, 175, 143, 662, 661, 143,
+ 60, 416, 415, 660, 659, 325, 64, 143, 463, 326,
+ 556, 61, 531, 0, 590, 589, 467, 65, 259, 258,
+ 654, 653, 143, 501, 436, 60, 525, 426, 491, 0,
+ 626, 542, 631, 632, 259, 258, 61, 257, 256, 339,
+ 264, 60, 144, 174, 348, 168, 0, 179, 352, 169,
+ 252, 251, 61, 283, 259, 258, 631, 632, 60, 321,
+ 525, 87, 175, 88, 411, 0, 532, 530, 66, 61,
+ 267, 265, 527, 66, 89, 236, 235, 527, 87, 87,
+ 88, 88, 87, 526, 88, 66, 549, 87, 526, 88,
+ 105, 89, 89, 525, 87, 89, 88, 87, 266, 88,
+ 89, 87, 87, 88, 88, 567, 527, 89, 174, 106,
+ 89, 107, 477, 67, 89, 89, 525, 526, 67, 68,
+ 657, 656, 580, 525, 68, 143, 0, 175, 0, 176,
+ 67, 87, 87, 88, 88, 0, 68, 0, 0, 527,
+ 550, 548, 174, 0, 89, 89, 0, 581, 579, 0,
+ 526, 87, 655, 88, 87, 0, 88, 0, 592, 568,
+ 566, 175, 527, 411, 89, 478, 476, 89, 650, 527,
+ 75, 76, 0, 526, 75, 76, 285, 286, 446, 445,
+ 526, 0, 651, 649, 558, 285, 286, 6, 5, 4,
+ 1, 3, 2, 0, 0, 0, 0, 77, 78, 0,
+ 0, 77, 78, 287, 288, 0, 290, 291, 0, 0,
+ 290, 291, 287, 288, 648, 292, 290, 291, 293, 292,
+ 294, 0, 293, 0, 294, 292, 290, 291, 293, 0,
+ 294, 35, 290, 291, 35, 292, 0, 0, 293, 0,
+ 294, 292, 80, 81, 293, 593, 294, 35, 0, 0,
+ 82, 83, 80, 81, 84, 35, 85, 174, 0, 0,
+ 82, 83, 0, 0, 84, 35, 85, 0, 49, 52,
+ 50, 49, 52, 50, 0, -98, 175, 0, 176, 35,
+ 0, 0, 0, 0, 49, 52, 50, 35, 0, 0,
+ 0, 0, 49, 52, 50, 0, 46, 34, 51, 46,
+ 34, 51, 49, 52, 50, 0, 0, 0, 0, 0,
+ 0, 0, 46, 34, 51, 0, 49, 52, 50, 0,
+ 46, 34, 51, 0, 49, 52, 50, 35, 0, 0,
+ 46, 34, 51, 35, 0, 0, 35, 0, 0, 35,
+ 0, 0, 35, 0, 46, 34, 51, 35, 80, 81,
+ 35, 0, 46, 34, 51, 0, 82, 83, 0, 0,
+ 84, 0, 85, 0, 49, 52, 50, 0, 0, 0,
+ 49, 52, 50, 49, 52, 50, 49, 52, 50, 49,
+ 52, 50, 0, 35, 49, 52, 50, 49, 52, 50,
+ 184, 0, 46, 34, 51, 0, 0, 0, 46, 34,
+ 51, 46, 34, 51, 46, 34, 51, 46, 34, 51,
+ 0, 0, 46, 34, 51, 46, 34, 51, 35, 0,
+ 49, 52, 50, 35, 0, 184, 35, 0, 0, 0,
+ 184, 35, 0, 0, 35, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 46, 34,
+ 51, 0, 0, 0, 0, 49, 52, 50, 250, 249,
+ 49, 52, 50, 49, 52, 50, 250, 249, 49, 52,
+ 50, 49, 52, 50, 0, 0, 0, 35, 0, 0,
+ 0, 0, 0, 46, 34, 51, 0, 0, 46, 34,
+ 51, 46, 34, 51, 0, 0, 46, 34, 51, 46,
+ 34, 51, 0, 0, 0, 0, 0, 0, 35, 250,
+ 249, 0, 0, 0, 49, 52, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 164, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,
- 31, 0, 0, 0, 0, 0, 0, 0, 0, 33,
- 0, 0, 0, 0, 0, 0, 35, 0, 0, 0,
- 36, 37, 0, 38, 0, 0, 0, 0, 0, 0,
- 42, 0, 0, 0, 45, 0, 0, 0, 0, 0,
+ 255, 254, 46, 34, 51, 49, 52, 50, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 53, 49, 52, 50, 0, 54, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 44, 56,
- 32, 0, 0, 0, 41, 0, 0, 0, 0, 0,
- 46, 34, 51, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 30, 31, 0, 0, 0, 0, 0, 0,
- 0, 0, 33, 0, 0, 0, 0, 0, 0, 35,
- 0, 0, 0, 36, 37, 0, 38, 0, 0, 0,
- 0, 0, 0, 516, 0, 0, 0, 45, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 53, 49, 52, 50, 0,
- 54, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 44, 56, 32, 0, 0, 0, 41, 0, 0,
0, 0, 0, 46, 34, 51, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 515, 0, 30, 31, 0,
- 0, 0, 0, 0, 0, 0, 0, 219, 0, 0,
- 0, 0, 0, 0, 35, 0, 0, 0, 36, 37,
- 0, 38, 0, 0, 0, 0, 0, 0, 516, 0,
- 0, 0, 45, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 30, 31, 153, 0, 0, 0, 0,
+ 0, 0, 0, 33, 0, 154, 0, 0, 0, 155,
+ 35, 0, 0, 0, 36, 37, 0, 38, 156, 0,
+ 157, 0, 0, 0, 516, 0, 0, 0, 45, 0,
+ 0, 158, 0, 159, 64, 0, 0, 0, 0, 0,
+ 0, 160, 0, 0, 161, 65, 53, 49, 52, 50,
+ 162, 54, 0, 0, 0, 0, 163, 0, 0, 0,
+ 0, 0, 44, 56, 32, 0, 0, 0, 41, 0,
+ 0, 0, 164, 0, 0, 46, 34, 51, 0, 0,
+ 0, 0, 0, 0, 0, 30, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 33, 0, 0, 153, 0,
+ 0, 0, 35, 0, 0, 0, 36, 37, 154, 38,
+ 0, 0, 155, 0, 0, 0, 516, 0, 0, 0,
+ 45, 156, 0, 157, 0, 0, 319, 0, 0, 0,
+ 0, 0, 0, 0, 158, 0, 159, 64, 53, 49,
+ 52, 50, 0, 54, 160, 0, 0, 161, 65, 0,
+ 0, 0, 0, 162, 44, 56, 32, 0, 0, 163,
+ 41, 0, 0, 0, 0, 0, 0, 46, 34, 51,
+ 0, 0, 0, 0, 0, 164, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 53, 517, 519, 518, 0, 54, 0, 0, 0, 0,
- 227, 0, 0, 0, 0, 0, 44, 56, 32, 214,
- 0, 0, 41, 0, 0, 0, 0, 0, 46, 34,
- 51, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 515, 0, 30, 31, 0, 0, 0, 0, 0, 0,
- 0, 0, 219, 0, 0, 0, 0, 0, 0, 35,
- 0, 0, 0, 36, 37, 0, 38, 0, 0, 0,
- 0, 0, 0, 516, 0, 0, 0, 45, 0, 0,
- 0, 0, 0, 0, 0, 560, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 53, 517, 519, 518, 0,
- 54, 0, 0, 0, 0, 227, 0, 0, 0, 0,
- 0, 44, 56, 32, 214, 0, 0, 41, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 30, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 33, 0, 0, 0, 0, 0, 0, 35, 0,
+ 0, 0, 36, 37, 0, 38, 0, 0, 0, 0,
+ 0, 0, 516, 0, 0, 0, 45, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 53, 49, 52, 50, 0, 54,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 44, 56, 32, 0, 0, 0, 41, 0, 0, 0,
+ 0, 0, 0, 46, 34, 51, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 30, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 33, 0, 0, 0, 0,
+ 0, 0, 35, 0, 0, 0, 36, 37, 0, 38,
+ 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
+ 45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 53, 49,
+ 52, 50, 0, 54, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 44, 56, 32, 0, 0, 0,
+ 41, 0, 0, 0, 0, 0, 0, 46, 34, 51,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 515,
+ 0, 30, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 219, 0, 0, 0, 0, 0, 0, 35, 0,
+ 0, 0, 36, 37, 0, 38, 0, 0, 0, 0,
+ 0, 0, 516, 0, 0, 0, 45, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 53, 517, 519, 518, 0, 54,
+ 0, 0, 0, 0, 227, 0, 0, 0, 0, 0,
+ 44, 56, 32, 214, 0, 0, 41, 0, 0, 0,
0, 0, 0, 46, 34, 51, 0, 0, 0, 0,
0, 0, 0, 0, 0, 515, 0, 30, 31, 0,
0, 0, 0, 0, 0, 0, 0, 219, 0, 0,
@@ -478,84 +484,85 @@ const short QQmlJSGrammar::action_info [] = {
563, 0, 0, 0, 0, 0, 0, 0, 0, 0,
53, 517, 519, 518, 0, 54, 0, 0, 0, 0,
227, 0, 0, 0, 0, 0, 44, 56, 32, 214,
- 0, 0, 41, 0, 0, 0, 0, 0, 46, 34,
- 51, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 29, 30, 31, 0, 0, 0, 0, 0, 0, 0,
- 0, 33, 0, 0, 0, 0, 0, 0, 35, 0,
- 0, 0, 36, 37, 0, 38, 0, 0, 0, 39,
- 0, 40, 42, 43, 0, 0, 45, 0, 0, 0,
- 47, 0, 48, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 53, 49, 52, 50, 0, 54,
- 0, 55, 0, 57, 0, 58, 0, 0, 0, 0,
- 44, 56, 32, 0, 0, 0, 41, 0, 0, 0,
- 0, 0, 46, 34, 51, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -125, 0, 0, 0, 29, 30,
- 31, 0, 0, 0, 0, 0, 0, 0, 0, 33,
- 0, 0, 0, 0, 0, 0, 35, 0, 0, 0,
- 36, 37, 0, 38, 0, 0, 0, 39, 0, 40,
- 42, 43, 0, 0, 45, 0, 0, 0, 47, 0,
- 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 53, 49, 52, 50, 0, 54, 0, 55,
- 0, 57, 0, 58, 0, 0, 0, 0, 44, 56,
- 32, 0, 0, 0, 41, 0, 0, 0, 0, 0,
- 46, 34, 51, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 29, 30, 31, 0, 0, 0, 0, 0,
- 0, 0, 0, 33, 0, 0, 0, 0, 0, 0,
+ 0, 0, 41, 0, 0, 0, 0, 0, 0, 46,
+ 34, 51, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 515, 0, 30, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 219, 0, 0, 0, 0, 0, 0,
35, 0, 0, 0, 36, 37, 0, 38, 0, 0,
- 0, 39, 0, 40, 42, 43, 0, 0, 45, 0,
- 0, 0, 47, 0, 48, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 53, 49, 52, 50,
- 0, 54, 0, 55, 0, 57, 282, 58, 0, 0,
- 0, 0, 44, 56, 32, 0, 0, 0, 41, 0,
+ 0, 0, 0, 0, 516, 0, 0, 0, 45, 0,
+ 0, 0, 0, 0, 0, 0, 560, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 53, 517, 519, 518,
+ 0, 54, 0, 0, 0, 0, 227, 0, 0, 0,
+ 0, 0, 44, 56, 32, 214, 0, 0, 41, 0,
+ 0, 0, 0, 0, 0, 46, 34, 51, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 29, 30, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 33, 0,
+ 0, 0, 0, 0, 0, 35, 0, 0, 0, 36,
+ 37, 0, 38, 0, 0, 0, 39, 0, 40, 42,
+ 43, 0, 0, 45, 0, 0, 0, 47, 0, 48,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 53, 49, 52, 50, 0, 54, 0, 55, 0,
+ 57, 0, 58, 0, 0, 0, 0, 44, 56, 32,
+ 0, 0, 0, 41, 0, 0, 0, 0, 0, 0,
+ 46, 34, 51, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, -131, 0, 0, 0, 29, 30, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 33, 0, 0,
+ 0, 0, 0, 0, 35, 0, 0, 0, 36, 37,
+ 0, 38, 0, 0, 0, 39, 0, 40, 42, 43,
+ 0, 0, 45, 0, 0, 0, 47, 0, 48, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 53, 49, 52, 50, 0, 54, 0, 55, 0, 57,
+ 0, 58, 0, 0, 0, 0, 44, 56, 32, 0,
+ 0, 0, 41, 0, 0, 0, 0, 0, 0, 46,
+ 34, 51, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 29, 30, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 33, 0, 0, 0, 0, 0, 0, 35,
+ 0, 0, 0, 36, 37, 0, 38, 0, 0, 0,
+ 39, 0, 40, 42, 43, 0, 0, 45, 0, 0,
+ 0, 47, 0, 48, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 53, 49, 52, 50, 0,
+ 54, 0, 55, 0, 57, 282, 58, 0, 0, 0,
+ 0, 44, 56, 32, 0, 0, 0, 41, 0, 0,
0, 0, 0, 0, 46, 34, 51, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 496, 0, 0, 29,
+ 0, 0, 0, 0, 0, 0, 488, 0, 0, 29,
30, 31, 0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 0, 0, 0, 35, 0, 0,
0, 36, 37, 0, 38, 0, 0, 0, 39, 0,
40, 42, 43, 0, 0, 45, 0, 0, 0, 47,
- 0, 48, 0, 0, 499, 0, 0, 0, 0, 0,
+ 0, 48, 0, 0, 489, 0, 0, 0, 0, 0,
0, 0, 0, 53, 49, 52, 50, 0, 54, 0,
55, 0, 57, 0, 58, 0, 0, 0, 0, 44,
56, 32, 0, 0, 0, 41, 0, 0, 0, 0,
- 0, 46, 34, 51, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 496, 0, 0, 29, 30, 31, 0,
- 0, 0, 0, 0, 0, 0, 0, 33, 0, 0,
- 0, 0, 0, 0, 35, 0, 0, 0, 36, 37,
- 0, 38, 0, 0, 0, 39, 0, 40, 42, 43,
- 0, 0, 45, 0, 0, 0, 47, 0, 48, 0,
- 0, 497, 0, 0, 0, 0, 0, 0, 0, 0,
- 53, 49, 52, 50, 0, 54, 0, 55, 0, 57,
- 0, 58, 0, 0, 0, 0, 44, 56, 32, 0,
- 0, 0, 41, 0, 0, 0, 0, 0, 46, 34,
+ 0, 0, 46, 34, 51, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 488, 0, 0, 29, 30, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 33, 0,
+ 0, 0, 0, 0, 0, 35, 0, 0, 0, 36,
+ 37, 0, 38, 0, 0, 0, 39, 0, 40, 42,
+ 43, 0, 0, 45, 0, 0, 0, 47, 0, 48,
+ 0, 0, 494, 0, 0, 0, 0, 0, 0, 0,
+ 0, 53, 49, 52, 50, 0, 54, 0, 55, 0,
+ 57, 0, 58, 0, 0, 0, 0, 44, 56, 32,
+ 0, 0, 0, 41, 0, 0, 0, 0, 0, 0,
+ 46, 34, 51, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 496, 0, 0, 29, 30, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 33, 0, 0, 0,
+ 0, 0, 0, 35, 0, 0, 0, 36, 37, 0,
+ 38, 0, 0, 0, 39, 0, 40, 42, 43, 0,
+ 0, 45, 0, 0, 0, 47, 0, 48, 0, 0,
+ 497, 0, 0, 0, 0, 0, 0, 0, 0, 53,
+ 49, 52, 50, 0, 54, 0, 55, 0, 57, 0,
+ 58, 0, 0, 0, 0, 44, 56, 32, 0, 0,
+ 0, 41, 0, 0, 0, 0, 0, 0, 46, 34,
51, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 488, 0, 0, 29, 30, 31, 0, 0, 0, 0,
+ 496, 0, 0, 29, 30, 31, 0, 0, 0, 0,
0, 0, 0, 0, 33, 0, 0, 0, 0, 0,
0, 35, 0, 0, 0, 36, 37, 0, 38, 0,
0, 0, 39, 0, 40, 42, 43, 0, 0, 45,
- 0, 0, 0, 47, 0, 48, 0, 0, 489, 0,
+ 0, 0, 0, 47, 0, 48, 0, 0, 499, 0,
0, 0, 0, 0, 0, 0, 0, 53, 49, 52,
50, 0, 54, 0, 55, 0, 57, 0, 58, 0,
0, 0, 0, 44, 56, 32, 0, 0, 0, 41,
- 0, 0, 0, 0, 0, 46, 34, 51, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 488, 0, 0,
- 29, 30, 31, 0, 0, 0, 0, 0, 0, 0,
- 0, 33, 0, 0, 0, 0, 0, 0, 35, 0,
- 0, 0, 36, 37, 0, 38, 0, 0, 0, 39,
- 0, 40, 42, 43, 0, 0, 45, 0, 0, 0,
- 47, 0, 48, 0, 0, 494, 0, 0, 0, 0,
- 0, 0, 0, 0, 53, 49, 52, 50, 0, 54,
- 0, 55, 0, 57, 0, 58, 0, 0, 0, 0,
- 44, 56, 32, 0, 0, 0, 41, 0, 0, 0,
- 0, 0, 46, 34, 51, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 29, 30, 31, 0, 0, 0,
- 0, 0, 0, 0, 0, 33, 0, 0, 0, 0,
- 0, 0, 35, 220, 0, 0, 221, 37, 0, 38,
- 0, 0, 0, 39, 0, 40, 42, 43, 0, 0,
- 45, 0, 0, 0, 47, 0, 48, 0, 0, 0,
- 0, 0, 0, 0, 223, 0, 0, 0, 53, 49,
- 52, 50, 224, 54, 0, 55, 226, 57, 0, 58,
- 0, 229, 0, 0, 44, 56, 32, 0, 0, 0,
- 41, 0, 0, 0, 0, 0, 46, 34, 51, 0,
+ 0, 0, 0, 0, 0, 0, 46, 34, 51, 0,
0, 0, 0, 0, 0, 0, 0, 0, 29, 30,
31, 0, 0, 0, 0, 0, 0, 0, 0, 33,
0, 0, 0, 0, 0, 0, 35, 220, 0, 0,
@@ -565,139 +572,150 @@ const short QQmlJSGrammar::action_info [] = {
0, 0, 53, 49, 52, 50, 224, 54, 0, 55,
226, 57, 0, 58, 0, 229, 0, 0, 44, 56,
32, 0, 0, 0, 41, 0, 0, 0, 0, 0,
+ 0, 46, 34, 51, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 29, 30, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 33, 0, 0, 0, 0, 0,
+ 0, 35, 220, 0, 0, 221, 37, 0, 38, 0,
+ 0, 0, 39, 0, 40, 42, 43, 0, 0, 45,
+ 0, 0, 0, 47, 0, 48, 0, 0, 0, 0,
+ 0, 0, 0, 223, 0, 0, 0, 53, 49, 52,
+ 50, 224, 54, 0, 55, 226, 57, 0, 58, 0,
+ 229, 0, 0, 44, 56, 32, 0, 0, 0, 41,
+ 0, 0, 0, 0, 0, 0, 46, 34, 51, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 111, 112,
+ 113, 0, 0, 115, 117, 118, 0, 0, 119, 0,
+ 120, 0, 0, 0, 122, 123, 124, 0, 0, 0,
+ 0, 0, 0, 35, 125, 126, 127, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 128, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 131, 0, 0, 0, 0, 0, 0,
+ 49, 52, 50, 132, 133, 134, 0, 136, 137, 138,
+ 139, 140, 141, 0, 0, 129, 135, 121, 114, 116,
+ 130, 0, 0, 0, 0, 0, 0, 0, 46, 34,
+ 51, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 111, 112, 113, 0, 0, 115, 117, 118, 0, 0,
+ 119, 0, 120, 0, 0, 0, 122, 123, 124, 0,
+ 0, 0, 0, 0, 0, 35, 125, 126, 127, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 128,
+ 0, 0, 0, 395, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 131, 0, 0, 0, 0,
+ 0, 397, 49, 52, 50, 132, 133, 134, 0, 136,
+ 137, 138, 139, 140, 141, 0, 0, 129, 135, 121,
+ 114, 116, 130, 0, 0, 0, 0, 0, 0, 0,
46, 34, 51, 0, 0, 0, 0, 0, 0, 0,
0, 0, 111, 112, 113, 0, 0, 115, 117, 118,
0, 0, 119, 0, 120, 0, 0, 0, 122, 123,
124, 0, 0, 0, 0, 0, 0, 35, 125, 126,
127, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 128, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 128, 0, 0, 0, 395, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 131, 0, 0,
- 0, 0, 0, 0, 49, 52, 50, 132, 133, 134,
+ 0, 0, 0, 397, 49, 52, 50, 132, 133, 134,
0, 136, 137, 138, 139, 140, 141, 0, 0, 129,
135, 121, 114, 116, 130, 0, 0, 0, 0, 0,
- 0, 46, 34, 51, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 111, 112, 113, 0, 0, 115, 117,
- 118, 0, 0, 119, 0, 120, 0, 0, 0, 122,
- 123, 124, 0, 0, 0, 0, 0, 0, 35, 125,
- 126, 127, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 128, 0, 0, 0, 395, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 131, 0,
- 0, 0, 0, 0, 397, 49, 52, 50, 132, 133,
- 134, 0, 136, 137, 138, 139, 140, 141, 0, 0,
- 129, 135, 121, 114, 116, 130, 0, 0, 0, 0,
- 0, 0, 46, 34, 51, 0, 0, 0, 0, 0,
+ 0, 0, 46, 374, 380, 0, 0, 0, 0, 0,
0, 0, 0, 0, 111, 112, 113, 0, 0, 115,
117, 118, 0, 0, 119, 0, 120, 0, 0, 0,
122, 123, 124, 0, 0, 0, 0, 0, 0, 35,
125, 126, 127, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 128, 0, 0, 0, 395, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 131,
+ 0, 0, 0, 0, 0, 396, 0, 0, 0, 131,
0, 0, 0, 0, 0, 397, 49, 52, 50, 132,
133, 134, 0, 136, 137, 138, 139, 140, 141, 0,
0, 129, 135, 121, 114, 116, 130, 0, 0, 0,
- 0, 0, 0, 46, 374, 380, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 111, 112, 113, 0, 0,
- 115, 117, 118, 0, 0, 119, 0, 120, 0, 0,
- 0, 122, 123, 124, 0, 0, 0, 0, 0, 0,
- 35, 125, 126, 127, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 128, 0, 0, 0, 395, 0,
- 0, 0, 0, 0, 0, 0, 396, 0, 0, 0,
- 131, 0, 0, 0, 0, 0, 397, 49, 52, 50,
- 132, 133, 134, 0, 136, 137, 138, 139, 140, 141,
- 0, 0, 129, 135, 121, 114, 116, 130, 0, 0,
0, 0, 0, 0, 46, 374, 380, 0, 0, 0,
0, 0, 0, 0, 0, 0, 213, 0, 0, 0,
0, 215, 0, 29, 30, 31, 217, 0, 0, 0,
- 0, 0, 0, 218, 33, 0, 0, 0, 0, 0,
+ 0, 0, 0, 218, 219, 0, 0, 0, 0, 0,
0, 35, 220, 0, 0, 221, 37, 0, 38, 0,
0, 0, 39, 0, 40, 42, 43, 0, 0, 45,
0, 0, 0, 47, 0, 48, 0, 0, 0, 0,
0, 222, 0, 223, 0, 0, 0, 53, 49, 52,
50, 224, 54, 225, 55, 226, 57, 227, 58, 228,
229, 0, 0, 44, 56, 32, 214, 216, 0, 41,
- 0, 0, 0, 0, 0, 46, 34, 51, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 213, 0, 0,
- 0, 0, 215, 0, 29, 30, 31, 217, 0, 0,
- 0, 0, 0, 0, 218, 219, 0, 0, 0, 0,
- 0, 0, 35, 220, 0, 0, 221, 37, 0, 38,
- 0, 0, 0, 39, 0, 40, 42, 43, 0, 0,
- 45, 0, 0, 0, 47, 0, 48, 0, 0, 0,
- 0, 0, 222, 0, 223, 0, 0, 0, 53, 49,
- 52, 50, 224, 54, 225, 55, 226, 57, 227, 58,
- 228, 229, 0, 0, 44, 56, 32, 214, 216, 0,
- 41, 0, 0, 0, 0, 0, 46, 34, 51, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 600, 112,
- 113, 0, 0, 602, 117, 604, 30, 31, 605, 0,
- 120, 0, 0, 0, 122, 607, 608, 0, 0, 0,
- 0, 0, 0, 35, 609, 126, 127, 221, 37, 0,
- 38, 0, 0, 0, 39, 0, 40, 610, 43, 0,
- 0, 612, 0, 0, 0, 47, 0, 48, 0, 0,
- 0, 0, 0, 613, 0, 223, 0, 0, 0, 614,
- 49, 52, 50, 615, 616, 617, 55, 619, 620, 621,
- 622, 623, 624, 0, 0, 611, 618, 606, 601, 603,
- 130, 41, 0, 0, 0, 0, 0, 46, 374, 380,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 365,
- 112, 113, 0, 0, 367, 117, 369, 30, 31, 370,
- 0, 120, 0, 0, 0, 122, 372, 373, 0, 0,
- 0, 0, 0, 0, 35, 375, 126, 127, 221, 37,
- 0, 38, 0, 0, 0, 39, 0, 40, 376, 43,
- 0, 0, 378, 0, 0, 0, 47, 0, 48, 0,
- -271, 0, 0, 0, 379, 0, 223, 0, 0, 0,
- 381, 49, 52, 50, 382, 383, 384, 55, 386, 387,
- 388, 389, 390, 391, 0, 0, 377, 385, 371, 366,
- 368, 130, 41, 0, 0, 0, 0, 0, 46, 374,
- 380, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 46, 34, 51, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 213, 0,
+ 0, 0, 0, 215, 0, 29, 30, 31, 217, 0,
+ 0, 0, 0, 0, 0, 218, 33, 0, 0, 0,
+ 0, 0, 0, 35, 220, 0, 0, 221, 37, 0,
+ 38, 0, 0, 0, 39, 0, 40, 42, 43, 0,
+ 0, 45, 0, 0, 0, 47, 0, 48, 0, 0,
+ 0, 0, 0, 222, 0, 223, 0, 0, 0, 53,
+ 49, 52, 50, 224, 54, 225, 55, 226, 57, 227,
+ 58, 228, 229, 0, 0, 44, 56, 32, 214, 216,
+ 0, 41, 0, 0, 0, 0, 0, 0, 46, 34,
+ 51, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 600, 112, 113, 0, 0, 602, 117, 604, 30, 31,
+ 605, 0, 120, 0, 0, 0, 122, 607, 608, 0,
+ 0, 0, 0, 0, 0, 35, 609, 126, 127, 221,
+ 37, 0, 38, 0, 0, 0, 39, 0, 40, 610,
+ 43, 0, 0, 612, 0, 0, 0, 47, 0, 48,
+ 0, 0, 0, 0, 0, 613, 0, 223, 0, 0,
+ 0, 614, 49, 52, 50, 615, 616, 617, 55, 619,
+ 620, 621, 622, 623, 624, 0, 0, 611, 618, 606,
+ 601, 603, 130, 41, 0, 0, 0, 0, 0, 0,
+ 46, 374, 380, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 365, 112, 113, 0, 0, 367, 117, 369,
+ 30, 31, 370, 0, 120, 0, 0, 0, 122, 372,
+ 373, 0, 0, 0, 0, 0, 0, 35, 375, 126,
+ 127, 221, 37, 0, 38, 0, 0, 0, 39, 0,
+ 40, 376, 43, 0, 0, 378, 0, 0, 0, 47,
+ 0, 48, 0, -277, 0, 0, 0, 379, 0, 223,
+ 0, 0, 0, 381, 49, 52, 50, 382, 383, 384,
+ 55, 386, 387, 388, 389, 390, 391, 0, 0, 377,
+ 385, 371, 366, 368, 130, 41, 0, 0, 0, 0,
+ 0, 0, 46, 374, 380, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,
- 565, 148, 545, 16, 649, 547, 541, 469, 320, 529,
- 528, 630, 183, 248, 263, 500, 485, 447, 629, 183,
- 627, 444, 253, 393, 587, 652, 313, 152, 643, 572,
- 591, 575, 586, 638, 331, 574, 453, 455, 466, 253,
- 437, 178, 433, 253, 0, 248, 584, 458, 248, 313,
- 441, 183, 444, 457, 237, 190, 447, 188, 206, 425,
- 400, 462, 351, 313, 347, 150, 165, 447, 475, 444,
- 183, 145, 393, 260, 0, 409, 173, 409, 260, 362,
- 171, 514, 409, 495, 362, 393, 206, 498, 628, 313,
- 313, 206, 356, 142, 206, 331, 362, 599, 403, 0,
- 345, 62, 62, 62, 182, 62, 299, 182, 295, 206,
- 410, 417, 410, 206, 62, 393, 62, 410, 62, 296,
- 148, 298, 148, 297, 62, 62, 182, 504, 412, 62,
- 180, 502, 511, 206, 512, 62, 108, 460, 188, 62,
- 394, 188, 62, 206, 460, 247, 62, 206, 459, 206,
- 62, 102, 459, 62, 62, 514, 206, 62, 653, 503,
- 407, 343, 341, 62, 313, 110, 419, 167, 188, 187,
- 170, 340, 514, 104, 0, 553, 422, 206, 62, 206,
- 62, 63, 62, 72, 62, 510, 71, 97, 62, 514,
- 70, 62, 557, 69, 355, 62, 239, 62, 493, 318,
- 86, 469, 492, 62, 483, 74, 242, 206, 93, 62,
- 353, 62, 206, 260, 95, 0, 96, 62, 62, 62,
- 322, 62, 94, 206, 100, 98, 206, 99, 62, 247,
- 277, 464, 0, 206, 79, 281, 314, 468, 62, 62,
- 206, 507, 91, 246, 206, 62, 62, 349, 505, 90,
- 206, 62, 62, 460, 459, 62, 206, 506, 62, 401,
- 206, 62, 92, 309, 62, 108, 281, 362, 281, 281,
- 0, 313, 206, 62, 304, 479, 0, 309, 281, 62,
- 206, 327, 281, 0, 281, 337, 300, 309, 324, 0,
- 0, 62, 281, 0, 110, 177, 281, 62, 301, 308,
- 309, 0, 281, 309, 302, 281, 62, 62, 281, 330,
- 62, 281, 281, 289, 514, 281, 0, 0, 306, 284,
- 0, 522, 328, 569, 561, 311, 553, 564, 625, 0,
- 0, 0, 514, 513, 523, 514, 0, 0, 0, 522,
- 0, 0, 522, 316, 0, 0, 0, 0, 0, 485,
- 440, 513, 523, 0, 513, 523, 533, 534, 535, 536,
- 540, 537, 538, 577, 533, 534, 535, 536, 540, 537,
- 538, 594, 0, 0, 0, 0, 362, 0, 597, 598,
- 533, 534, 535, 536, 540, 537, 538, 0, 0, 206,
+ 148, 142, 183, 447, 469, 347, 575, 444, 547, 627,
+ 248, 320, 587, 572, 584, 586, 485, 591, 565, 529,
+ 313, 545, 447, 393, 253, 528, 500, 183, 574, 453,
+ 331, 652, 447, 437, 444, 313, 462, 455, 263, 457,
+ 237, 441, 206, 188, 190, 150, 16, 178, 433, 630,
+ 425, 641, 165, 400, 658, 458, 642, 171, 173, 248,
+ 475, 351, 498, 248, 253, 313, 183, 466, 183, 541,
+ 495, 629, 253, 512, 511, 188, 145, 206, 260, 645,
+ 644, 62, 0, 62, 362, 507, 298, 469, 206, 206,
+ 247, 514, 514, 62, 206, 460, 646, 409, 152, 409,
+ 599, 628, 355, 239, 206, 62, 62, 62, 362, 260,
+ 296, 297, 299, 331, 62, 62, 313, 504, 206, 295,
+ 62, 62, 459, 460, 356, 206, 277, 62, 62, 502,
+ 182, 281, 206, 62, 410, 182, 410, 401, 62, 353,
+ 459, 62, 62, 506, 505, 62, 62, 503, 493, 349,
+ 91, 62, 492, 206, 63, 206, 313, 62, 345, 483,
+ 393, 479, 62, 62, 260, 206, 444, 206, 510, 102,
+ 148, 62, 104, 182, 206, 188, 188, 468, 180, 170,
+ 206, 62, 148, 247, 62, 394, 460, 393, 409, 340,
+ 412, 341, 362, 206, 422, 167, 393, 206, 62, 108,
+ 459, 313, 62, 187, 419, 62, 62, 86, 206, 62,
+ 318, 98, 100, 403, 62, 99, 69, 322, 514, 514,
+ 313, 62, 417, 553, 557, 410, 206, 79, 110, 246,
+ 62, 343, 206, 206, 62, 0, 70, 62, 74, 71,
+ 62, 62, 206, 108, 90, 206, 93, 62, 62, 62,
+ 72, 62, 92, 62, 94, 62, 95, 309, 96, 407,
+ 97, 309, 281, 62, 362, 362, 281, 0, 281, 242,
+ 302, 0, 110, 177, 464, 0, 316, 309, 0, 308,
+ 206, 206, 281, 311, 309, 0, 62, 62, 309, 281,
+ 206, 281, 281, 281, 0, 314, 0, 0, 62, 330,
+ 62, 324, 0, 281, 327, 281, 337, 300, 62, 62,
+ 328, 304, 62, 281, 281, 301, 564, 281, 62, 289,
+ 306, 569, 561, 281, 0, 514, 553, 284, 625, 0,
+ 0, 514, 0, 0, 522, 0, 0, 0, 0, 0,
+ 522, 0, 0, 0, 0, 0, 513, 523, 0, 485,
+ 443, 440, 513, 523, 533, 534, 535, 536, 540, 537,
+ 538, 577, 533, 534, 535, 536, 540, 537, 538, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 514, 569, 0, 0, 0, 0, 0,
+ 0, 0, 522, 570, 571, 533, 534, 535, 536, 540,
+ 537, 538, 0, 0, 513, 523, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 443,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 569, 0, 0, 0, 0, 0, 0, 570,
- 571, 533, 534, 535, 536, 540, 537, 538, 0, 0,
+ 594, 0, 0, 0, 0, 0, 0, 0, 0, 597,
+ 598, 533, 534, 535, 536, 540, 537, 538, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -708,126 +726,128 @@ const short QQmlJSGrammar::action_info [] = {
0, 0, 0, 0, 0, 0, 0};
const short QQmlJSGrammar::action_check [] = {
- 60, 7, 7, 7, 34, 91, 24, 7, 61, 36,
- 33, 36, 7, 7, 7, 60, 33, 33, 55, 66,
- 8, 33, 55, 36, 16, 7, 36, 29, 8, 7,
- 7, 55, 17, 36, 7, 7, 7, 7, 7, 36,
- 55, 7, 7, 33, 33, 36, 33, 33, 7, 60,
- 7, 60, 20, 36, 33, 36, 55, 7, 33, 60,
- 5, 37, 36, 5, 60, 5, 7, 2, 66, 36,
- 33, 33, 36, 7, 1, 8, 60, 8, 33, 2,
- 36, 1, 8, 36, 2, 1, 8, 2, 17, 1,
- 0, 8, -1, 7, 55, 33, 33, -1, -1, 48,
- 60, -1, 6, 31, 55, 48, 36, 61, 60, 8,
- -1, 36, 60, -1, 7, 61, 20, 36, 8, 77,
- 15, 60, 8, 55, 48, 36, 10, 36, 36, 36,
- 7, 8, 79, 8, 8, 79, 8, 42, 8, 34,
- 8, 8, 48, 40, 8, 8, -1, 60, 53, 50,
- -1, 8, -1, 54, 51, 91, 15, 8, 79, 61,
- 62, 60, 8, 61, 62, 61, 62, 61, 62, 40,
- 60, 55, 61, 62, 60, 34, 61, 62, 61, 62,
- 51, 56, 61, 62, 56, 50, 60, 40, 15, 54,
- 60, 40, 60, 56, 61, 25, 60, 27, 51, 61,
- 62, 29, 51, 60, 29, 56, 15, 34, 38, 36,
- 15, 29, 8, 8, 12, 61, 62, 61, 62, 12,
- 36, 25, 7, 27, 25, 34, 27, 36, 25, 34,
- 27, 36, 7, 15, 38, 29, 25, 38, 27, 7,
- -1, 38, 25, 29, 27, 61, 62, 75, 92, 38,
- 75, 12, 34, 7, 36, 38, -1, 75, 86, 57,
- 56, 86, -1, -1, 57, 63, 61, 62, 86, 25,
- 63, 27, 25, -1, 27, -1, 61, 62, 25, 33,
- 27, 75, 38, 61, 62, 38, 61, 62, 25, 75,
- 27, 38, 86, 61, 62, 25, 57, 27, 29, -1,
- 86, 38, 63, 25, 25, 27, 27, 15, 38, 8,
- -1, 89, -1, 18, 19, 47, 38, 38, 18, 19,
- 18, 19, -1, -1, -1, 33, 34, -1, 36, 61,
- 62, 15, 97, 98, 99, 100, 101, 102, -1, 93,
- 45, 46, 23, 24, 75, 45, 46, 45, 46, 33,
- 34, 32, 36, -1, 35, 86, 37, 23, 24, -1,
- 92, -1, 61, 62, 23, 24, 32, -1, -1, 35,
- -1, 37, -1, 32, 23, 24, 35, -1, 37, -1,
- 23, 24, -1, 32, -1, -1, 35, -1, 37, 32,
- 23, 24, 35, 29, 37, -1, -1, -1, 31, 32,
- 23, 24, 35, 29, 37, -1, 18, 19, 31, 32,
- 23, 24, 35, 29, 37, -1, -1, -1, 31, 32,
- -1, -1, 35, 29, 37, -1, 29, -1, -1, -1,
- 66, 67, 68, 45, 46, -1, -1, -1, -1, -1,
- 66, 67, 68, -1, 29, -1, -1, 29, -1, -1,
- 66, 67, 68, -1, -1, -1, -1, 93, 94, 95,
- 66, 67, 68, 66, 67, 68, -1, 93, 94, 95,
- -1, -1, -1, -1, -1, -1, -1, 93, 94, 95,
- 29, 66, 67, 68, 66, 67, 68, 93, 94, 95,
- 93, 94, 95, 23, 24, 29, -1, -1, 29, -1,
- -1, 31, 32, -1, -1, 35, -1, 37, 93, 94,
- 95, 93, 94, 95, 29, -1, -1, 66, 67, 68,
- -1, 36, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 29, 66, 67, 68, 66, 67, 68, 36, -1,
- -1, -1, -1, -1, 93, 94, 95, -1, -1, -1,
- -1, 66, 67, 68, 29, -1, -1, -1, -1, 93,
- 94, 95, 93, 94, 95, 29, -1, -1, 66, 67,
- 68, -1, 36, -1, -1, 29, -1, -1, 93, 94,
- 95, -1, -1, -1, 29, -1, 61, 62, -1, -1,
- -1, 66, 67, 68, -1, 93, 94, 95, -1, -1,
- -1, -1, 66, 67, 68, 29, -1, -1, -1, -1,
- -1, -1, 66, 67, 68, -1, 61, 62, 93, 94,
- 95, 66, 67, 68, -1, -1, -1, -1, -1, 93,
- 94, 95, -1, -1, -1, -1, -1, 61, 62, 93,
- 94, 95, 66, 67, 68, -1, -1, -1, 93, 94,
- 95, 29, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 93,
- 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 61, 62, 3, -1, -1, 66, 67,
- 68, -1, -1, -1, -1, 13, -1, -1, -1, 17,
- -1, -1, -1, -1, -1, -1, -1, -1, 26, -1,
- 28, -1, -1, 31, -1, 93, 94, 95, -1, -1,
- -1, 39, -1, 41, 42, -1, -1, 3, -1, -1,
- -1, 49, -1, -1, 52, 53, -1, 13, -1, -1,
- 58, 17, -1, -1, -1, -1, 64, -1, -1, -1,
- 26, -1, 28, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 80, 39, -1, 41, 42, -1, -1, -1,
- -1, -1, -1, 49, -1, -1, 52, 53, -1, -1,
- -1, -1, 58, -1, -1, -1, -1, -1, 64, -1,
+ 2, 55, 34, 7, 60, 36, 31, 37, 61, 17,
+ 24, 16, 2, 20, 33, 60, 5, 8, 36, 79,
+ 60, 36, 33, 33, 7, 48, 55, 1, 55, 0,
+ 33, 7, 60, 33, 60, 36, 60, 36, 8, 7,
+ 36, 8, 7, 55, 7, 5, 55, 33, 7, 7,
+ 48, 7, 36, 7, 36, 5, 7, 36, 1, 36,
+ 7, 36, 7, 7, 61, 7, 60, 33, 8, 1,
+ 7, 77, 36, 7, 36, 60, 7, 29, 8, 36,
+ 7, 36, 55, 36, 79, 33, 79, 36, 66, 8,
+ 36, 60, 33, 17, 33, 7, 2, 8, 36, 79,
+ 36, 2, 7, 7, 7, 66, 8, 33, 33, 7,
+ -1, 33, 8, 48, 8, 15, 15, 33, 36, 36,
+ 33, 8, 55, 7, 8, 8, 15, 6, 48, 10,
+ 8, 60, 8, 61, 34, 34, 8, 60, 8, 60,
+ 55, 20, 8, -1, 8, 34, 8, 61, 62, 8,
+ 40, 61, 62, 61, 62, 50, 42, 8, 60, 54,
+ 56, 51, 7, -1, 61, 62, 60, 53, 61, 62,
+ 61, 62, 8, 60, 55, 40, 29, 60, 56, -1,
+ 56, 29, 91, 92, 61, 62, 51, 61, 62, 61,
+ 60, 40, 56, 15, 60, 50, -1, 56, 60, 54,
+ 61, 62, 51, 1, 61, 62, 91, 92, 40, 60,
+ 29, 25, 34, 27, 36, -1, 61, 62, 12, 51,
+ 61, 62, 75, 12, 38, 61, 62, 75, 25, 25,
+ 27, 27, 25, 86, 27, 12, 7, 25, 86, 27,
+ 15, 38, 38, 29, 25, 38, 27, 25, 89, 27,
+ 38, 25, 25, 27, 27, 7, 75, 38, 15, 34,
+ 38, 36, 8, 57, 38, 38, 29, 86, 57, 63,
+ 61, 62, 36, 29, 63, 8, -1, 34, -1, 36,
+ 57, 25, 25, 27, 27, -1, 63, -1, -1, 75,
+ 61, 62, 15, -1, 38, 38, -1, 61, 62, -1,
+ 86, 25, 93, 27, 25, -1, 27, -1, 7, 61,
+ 62, 34, 75, 36, 38, 61, 62, 38, 47, 75,
+ 18, 19, -1, 86, 18, 19, 18, 19, 61, 62,
+ 86, -1, 61, 62, 33, 18, 19, 98, 99, 100,
+ 101, 102, 103, -1, -1, -1, -1, 45, 46, -1,
+ -1, 45, 46, 45, 46, -1, 23, 24, -1, -1,
+ 23, 24, 45, 46, 93, 32, 23, 24, 35, 32,
+ 37, -1, 35, -1, 37, 32, 23, 24, 35, -1,
+ 37, 29, 23, 24, 29, 32, -1, -1, 35, -1,
+ 37, 32, 23, 24, 35, 94, 37, 29, -1, -1,
+ 31, 32, 23, 24, 35, 29, 37, 15, -1, -1,
+ 31, 32, -1, -1, 35, 29, 37, -1, 66, 67,
+ 68, 66, 67, 68, -1, 33, 34, -1, 36, 29,
+ -1, -1, -1, -1, 66, 67, 68, 29, -1, -1,
+ -1, -1, 66, 67, 68, -1, 94, 95, 96, 94,
+ 95, 96, 66, 67, 68, -1, -1, -1, -1, -1,
+ -1, -1, 94, 95, 96, -1, 66, 67, 68, -1,
+ 94, 95, 96, -1, 66, 67, 68, 29, -1, -1,
+ 94, 95, 96, 29, -1, -1, 29, -1, -1, 29,
+ -1, -1, 29, -1, 94, 95, 96, 29, 23, 24,
+ 29, -1, 94, 95, 96, -1, 31, 32, -1, -1,
+ 35, -1, 37, -1, 66, 67, 68, -1, -1, -1,
+ 66, 67, 68, 66, 67, 68, 66, 67, 68, 66,
+ 67, 68, -1, 29, 66, 67, 68, 66, 67, 68,
+ 36, -1, 94, 95, 96, -1, -1, -1, 94, 95,
+ 96, 94, 95, 96, 94, 95, 96, 94, 95, 96,
+ -1, -1, 94, 95, 96, 94, 95, 96, 29, -1,
+ 66, 67, 68, 29, -1, 36, 29, -1, -1, -1,
+ 36, 29, -1, -1, 29, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 94, 95,
+ 96, -1, -1, -1, -1, 66, 67, 68, 61, 62,
+ 66, 67, 68, 66, 67, 68, 61, 62, 66, 67,
+ 68, 66, 67, 68, -1, -1, -1, 29, -1, -1,
+ -1, -1, -1, 94, 95, 96, -1, -1, 94, 95,
+ 96, 94, 95, 96, -1, -1, 94, 95, 96, 94,
+ 95, 96, -1, -1, -1, -1, -1, -1, 29, 61,
+ 62, -1, -1, -1, 66, 67, 68, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 80, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 12,
- 13, -1, -1, -1, -1, -1, -1, -1, -1, 22,
- -1, -1, -1, -1, -1, -1, 29, -1, -1, -1,
- 33, 34, -1, 36, -1, -1, -1, -1, -1, -1,
- 43, -1, -1, -1, 47, -1, -1, -1, -1, -1,
+ 61, 62, 94, 95, 96, 66, 67, 68, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 65, 66, 67, 68, -1, 70, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 81, 82,
- 83, -1, -1, -1, 87, -1, -1, -1, -1, -1,
- 93, 94, 95, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 12, 13, -1, -1, -1, -1, -1, -1,
- -1, -1, 22, -1, -1, -1, -1, -1, -1, 29,
- -1, -1, -1, 33, 34, -1, 36, -1, -1, -1,
- -1, -1, -1, 43, -1, -1, -1, 47, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 65, 66, 67, 68, -1,
- 70, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 81, 82, 83, -1, -1, -1, 87, -1, -1,
- -1, -1, -1, 93, 94, 95, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 10, -1, 12, 13, -1,
- -1, -1, -1, -1, -1, -1, -1, 22, -1, -1,
- -1, -1, -1, -1, 29, -1, -1, -1, 33, 34,
- -1, 36, -1, -1, -1, -1, -1, -1, 43, -1,
- -1, -1, 47, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 94, 95, 96, -1, -1, -1, -1,
+ -1, -1, -1, 12, 13, 3, -1, -1, -1, -1,
+ -1, -1, -1, 22, -1, 13, -1, -1, -1, 17,
+ 29, -1, -1, -1, 33, 34, -1, 36, 26, -1,
+ 28, -1, -1, -1, 43, -1, -1, -1, 47, -1,
+ -1, 39, -1, 41, 42, -1, -1, -1, -1, -1,
+ -1, 49, -1, -1, 52, 53, 65, 66, 67, 68,
+ 58, 70, -1, -1, -1, -1, 64, -1, -1, -1,
+ -1, -1, 81, 82, 83, -1, -1, -1, 87, -1,
+ -1, -1, 80, -1, -1, 94, 95, 96, -1, -1,
+ -1, -1, -1, -1, -1, 12, 13, -1, -1, -1,
+ -1, -1, -1, -1, -1, 22, -1, -1, 3, -1,
+ -1, -1, 29, -1, -1, -1, 33, 34, 13, 36,
+ -1, -1, 17, -1, -1, -1, 43, -1, -1, -1,
+ 47, 26, -1, 28, -1, -1, 31, -1, -1, -1,
+ -1, -1, -1, -1, 39, -1, 41, 42, 65, 66,
+ 67, 68, -1, 70, 49, -1, -1, 52, 53, -1,
+ -1, -1, -1, 58, 81, 82, 83, -1, -1, 64,
+ 87, -1, -1, -1, -1, -1, -1, 94, 95, 96,
+ -1, -1, -1, -1, -1, 80, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 65, 66, 67, 68, -1, 70, -1, -1, -1, -1,
- 75, -1, -1, -1, -1, -1, 81, 82, 83, 84,
- -1, -1, 87, -1, -1, -1, -1, -1, 93, 94,
- 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 10, -1, 12, 13, -1, -1, -1, -1, -1, -1,
- -1, -1, 22, -1, -1, -1, -1, -1, -1, 29,
- -1, -1, -1, 33, 34, -1, 36, -1, -1, -1,
- -1, -1, -1, 43, -1, -1, -1, 47, -1, -1,
- -1, -1, -1, -1, -1, 55, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 65, 66, 67, 68, -1,
- 70, -1, -1, -1, -1, 75, -1, -1, -1, -1,
- -1, 81, 82, 83, 84, -1, -1, 87, -1, -1,
- -1, -1, -1, 93, 94, 95, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 12, 13, -1, -1, -1, -1, -1, -1, -1,
+ -1, 22, -1, -1, -1, -1, -1, -1, 29, -1,
+ -1, -1, 33, 34, -1, 36, -1, -1, -1, -1,
+ -1, -1, 43, -1, -1, -1, 47, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 65, 66, 67, 68, -1, 70,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 81, 82, 83, -1, -1, -1, 87, -1, -1, -1,
+ -1, -1, -1, 94, 95, 96, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 12, 13, -1, -1, -1,
+ -1, -1, -1, -1, -1, 22, -1, -1, -1, -1,
+ -1, -1, 29, -1, -1, -1, 33, 34, -1, 36,
+ -1, -1, -1, -1, -1, -1, 43, -1, -1, -1,
+ 47, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 65, 66,
+ 67, 68, -1, 70, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 81, 82, 83, -1, -1, -1,
+ 87, -1, -1, -1, -1, -1, -1, 94, 95, 96,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 10,
+ -1, 12, 13, -1, -1, -1, -1, -1, -1, -1,
+ -1, 22, -1, -1, -1, -1, -1, -1, 29, -1,
+ -1, -1, 33, 34, -1, 36, -1, -1, -1, -1,
+ -1, -1, 43, -1, -1, -1, 47, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 65, 66, 67, 68, -1, 70,
+ -1, -1, -1, -1, 75, -1, -1, -1, -1, -1,
+ 81, 82, 83, 84, -1, -1, 87, -1, -1, -1,
+ -1, -1, -1, 94, 95, 96, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 10, -1, 12, 13, -1,
-1, -1, -1, -1, -1, -1, -1, 22, -1, -1,
-1, -1, -1, -1, 29, -1, -1, -1, 33, 34,
@@ -836,36 +856,46 @@ const short QQmlJSGrammar::action_check [] = {
55, -1, -1, -1, -1, -1, -1, -1, -1, -1,
65, 66, 67, 68, -1, 70, -1, -1, -1, -1,
75, -1, -1, -1, -1, -1, 81, 82, 83, 84,
- -1, -1, 87, -1, -1, -1, -1, -1, 93, 94,
- 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 11, 12, 13, -1, -1, -1, -1, -1, -1, -1,
- -1, 22, -1, -1, -1, -1, -1, -1, 29, -1,
- -1, -1, 33, 34, -1, 36, -1, -1, -1, 40,
- -1, 42, 43, 44, -1, -1, 47, -1, -1, -1,
- 51, -1, 53, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 65, 66, 67, 68, -1, 70,
- -1, 72, -1, 74, -1, 76, -1, -1, -1, -1,
- 81, 82, 83, -1, -1, -1, 87, -1, -1, -1,
- -1, -1, 93, 94, 95, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 7, -1, -1, -1, 11, 12,
- 13, -1, -1, -1, -1, -1, -1, -1, -1, 22,
- -1, -1, -1, -1, -1, -1, 29, -1, -1, -1,
- 33, 34, -1, 36, -1, -1, -1, 40, -1, 42,
- 43, 44, -1, -1, 47, -1, -1, -1, 51, -1,
- 53, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 65, 66, 67, 68, -1, 70, -1, 72,
- -1, 74, -1, 76, -1, -1, -1, -1, 81, 82,
- 83, -1, -1, -1, 87, -1, -1, -1, -1, -1,
- 93, 94, 95, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 11, 12, 13, -1, -1, -1, -1, -1,
+ -1, -1, 87, -1, -1, -1, -1, -1, -1, 94,
+ 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 10, -1, 12, 13, -1, -1, -1, -1, -1,
-1, -1, -1, 22, -1, -1, -1, -1, -1, -1,
29, -1, -1, -1, 33, 34, -1, 36, -1, -1,
- -1, 40, -1, 42, 43, 44, -1, -1, 47, -1,
- -1, -1, 51, -1, 53, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 43, -1, -1, -1, 47, -1,
+ -1, -1, -1, -1, -1, -1, 55, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 65, 66, 67, 68,
- -1, 70, -1, 72, -1, 74, 75, 76, -1, -1,
- -1, -1, 81, 82, 83, -1, -1, -1, 87, -1,
- -1, -1, -1, -1, 93, 94, 95, -1, -1, -1,
+ -1, 70, -1, -1, -1, -1, 75, -1, -1, -1,
+ -1, -1, 81, 82, 83, 84, -1, -1, 87, -1,
+ -1, -1, -1, -1, -1, 94, 95, 96, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 11, 12, 13,
+ -1, -1, -1, -1, -1, -1, -1, -1, 22, -1,
+ -1, -1, -1, -1, -1, 29, -1, -1, -1, 33,
+ 34, -1, 36, -1, -1, -1, 40, -1, 42, 43,
+ 44, -1, -1, 47, -1, -1, -1, 51, -1, 53,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 65, 66, 67, 68, -1, 70, -1, 72, -1,
+ 74, -1, 76, -1, -1, -1, -1, 81, 82, 83,
+ -1, -1, -1, 87, -1, -1, -1, -1, -1, -1,
+ 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 7, -1, -1, -1, 11, 12, 13, -1,
+ -1, -1, -1, -1, -1, -1, -1, 22, -1, -1,
+ -1, -1, -1, -1, 29, -1, -1, -1, 33, 34,
+ -1, 36, -1, -1, -1, 40, -1, 42, 43, 44,
+ -1, -1, 47, -1, -1, -1, 51, -1, 53, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 65, 66, 67, 68, -1, 70, -1, 72, -1, 74,
+ -1, 76, -1, -1, -1, -1, 81, 82, 83, -1,
+ -1, -1, 87, -1, -1, -1, -1, -1, -1, 94,
+ 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 11, 12, 13, -1, -1, -1, -1, -1, -1,
+ -1, -1, 22, -1, -1, -1, -1, -1, -1, 29,
+ -1, -1, -1, 33, 34, -1, 36, -1, -1, -1,
+ 40, -1, 42, 43, 44, -1, -1, 47, -1, -1,
+ -1, 51, -1, 53, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 65, 66, 67, 68, -1,
+ 70, -1, 72, -1, 74, 75, 76, -1, -1, -1,
+ -1, 81, 82, 83, -1, -1, -1, 87, -1, -1,
+ -1, -1, -1, -1, 94, 95, 96, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 8, -1, -1, 11,
12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
22, -1, -1, -1, -1, -1, -1, 29, -1, -1,
@@ -875,17 +905,27 @@ const short QQmlJSGrammar::action_check [] = {
-1, -1, -1, 65, 66, 67, 68, -1, 70, -1,
72, -1, 74, -1, 76, -1, -1, -1, -1, 81,
82, 83, -1, -1, -1, 87, -1, -1, -1, -1,
- -1, 93, 94, 95, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 8, -1, -1, 11, 12, 13, -1,
- -1, -1, -1, -1, -1, -1, -1, 22, -1, -1,
- -1, -1, -1, -1, 29, -1, -1, -1, 33, 34,
- -1, 36, -1, -1, -1, 40, -1, 42, 43, 44,
- -1, -1, 47, -1, -1, -1, 51, -1, 53, -1,
- -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
- 65, 66, 67, 68, -1, 70, -1, 72, -1, 74,
- -1, 76, -1, -1, -1, -1, 81, 82, 83, -1,
- -1, -1, 87, -1, -1, -1, -1, -1, 93, 94,
- 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 94, 95, 96, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 8, -1, -1, 11, 12, 13,
+ -1, -1, -1, -1, -1, -1, -1, -1, 22, -1,
+ -1, -1, -1, -1, -1, 29, -1, -1, -1, 33,
+ 34, -1, 36, -1, -1, -1, 40, -1, 42, 43,
+ 44, -1, -1, 47, -1, -1, -1, 51, -1, 53,
+ -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
+ -1, 65, 66, 67, 68, -1, 70, -1, 72, -1,
+ 74, -1, 76, -1, -1, -1, -1, 81, 82, 83,
+ -1, -1, -1, 87, -1, -1, -1, -1, -1, -1,
+ 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 8, -1, -1, 11, 12, 13, -1, -1,
+ -1, -1, -1, -1, -1, -1, 22, -1, -1, -1,
+ -1, -1, -1, 29, -1, -1, -1, 33, 34, -1,
+ 36, -1, -1, -1, 40, -1, 42, 43, 44, -1,
+ -1, 47, -1, -1, -1, 51, -1, 53, -1, -1,
+ 56, -1, -1, -1, -1, -1, -1, -1, -1, 65,
+ 66, 67, 68, -1, 70, -1, 72, -1, 74, -1,
+ 76, -1, -1, -1, -1, 81, 82, 83, -1, -1,
+ -1, 87, -1, -1, -1, -1, -1, -1, 94, 95,
+ 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
8, -1, -1, 11, 12, 13, -1, -1, -1, -1,
-1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
-1, 29, -1, -1, -1, 33, 34, -1, 36, -1,
@@ -894,26 +934,7 @@ const short QQmlJSGrammar::action_check [] = {
-1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
68, -1, 70, -1, 72, -1, 74, -1, 76, -1,
-1, -1, -1, 81, 82, 83, -1, -1, -1, 87,
- -1, -1, -1, -1, -1, 93, 94, 95, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 8, -1, -1,
- 11, 12, 13, -1, -1, -1, -1, -1, -1, -1,
- -1, 22, -1, -1, -1, -1, -1, -1, 29, -1,
- -1, -1, 33, 34, -1, 36, -1, -1, -1, 40,
- -1, 42, 43, 44, -1, -1, 47, -1, -1, -1,
- 51, -1, 53, -1, -1, 56, -1, -1, -1, -1,
- -1, -1, -1, -1, 65, 66, 67, 68, -1, 70,
- -1, 72, -1, 74, -1, 76, -1, -1, -1, -1,
- 81, 82, 83, -1, -1, -1, 87, -1, -1, -1,
- -1, -1, 93, 94, 95, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 11, 12, 13, -1, -1, -1,
- -1, -1, -1, -1, -1, 22, -1, -1, -1, -1,
- -1, -1, 29, 30, -1, -1, 33, 34, -1, 36,
- -1, -1, -1, 40, -1, 42, 43, 44, -1, -1,
- 47, -1, -1, -1, 51, -1, 53, -1, -1, -1,
- -1, -1, -1, -1, 61, -1, -1, -1, 65, 66,
- 67, 68, 69, 70, -1, 72, 73, 74, -1, 76,
- -1, 78, -1, -1, 81, 82, 83, -1, -1, -1,
- 87, -1, -1, -1, -1, -1, 93, 94, 95, -1,
+ -1, -1, -1, -1, -1, -1, 94, 95, 96, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 11, 12,
13, -1, -1, -1, -1, -1, -1, -1, -1, 22,
-1, -1, -1, -1, -1, -1, 29, 30, -1, -1,
@@ -923,47 +944,57 @@ const short QQmlJSGrammar::action_check [] = {
-1, -1, 65, 66, 67, 68, 69, 70, -1, 72,
73, 74, -1, 76, -1, 78, -1, -1, 81, 82,
83, -1, -1, -1, 87, -1, -1, -1, -1, -1,
- 93, 94, 95, -1, -1, -1, -1, -1, -1, -1,
+ -1, 94, 95, 96, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 11, 12, 13, -1, -1, -1, -1,
+ -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
+ -1, 29, 30, -1, -1, 33, 34, -1, 36, -1,
+ -1, -1, 40, -1, 42, 43, 44, -1, -1, 47,
+ -1, -1, -1, 51, -1, 53, -1, -1, -1, -1,
+ -1, -1, -1, 61, -1, -1, -1, 65, 66, 67,
+ 68, 69, 70, -1, 72, 73, 74, -1, 76, -1,
+ 78, -1, -1, 81, 82, 83, -1, -1, -1, 87,
+ -1, -1, -1, -1, -1, -1, 94, 95, 96, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4, 5,
+ 6, -1, -1, 9, 10, 11, -1, -1, 14, -1,
+ 16, -1, -1, -1, 20, 21, 22, -1, -1, -1,
+ -1, -1, -1, 29, 30, 31, 32, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 43, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 59, -1, -1, -1, -1, -1, -1,
+ 66, 67, 68, 69, 70, 71, -1, 73, 74, 75,
+ 76, 77, 78, -1, -1, 81, 82, 83, 84, 85,
+ 86, -1, -1, -1, -1, -1, -1, -1, 94, 95,
+ 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4, 5, 6, -1, -1, 9, 10, 11, -1, -1,
+ 14, -1, 16, -1, -1, -1, 20, 21, 22, -1,
+ -1, -1, -1, -1, -1, 29, 30, 31, 32, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 43,
+ -1, -1, -1, 47, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 59, -1, -1, -1, -1,
+ -1, 65, 66, 67, 68, 69, 70, 71, -1, 73,
+ 74, 75, 76, 77, 78, -1, -1, 81, 82, 83,
+ 84, 85, 86, -1, -1, -1, -1, -1, -1, -1,
+ 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 4, 5, 6, -1, -1, 9, 10, 11,
-1, -1, 14, -1, 16, -1, -1, -1, 20, 21,
22, -1, -1, -1, -1, -1, -1, 29, 30, 31,
32, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 43, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 43, -1, -1, -1, 47, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 59, -1, -1,
- -1, -1, -1, -1, 66, 67, 68, 69, 70, 71,
+ -1, -1, -1, 65, 66, 67, 68, 69, 70, 71,
-1, 73, 74, 75, 76, 77, 78, -1, -1, 81,
82, 83, 84, 85, 86, -1, -1, -1, -1, -1,
- -1, 93, 94, 95, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 4, 5, 6, -1, -1, 9, 10,
- 11, -1, -1, 14, -1, 16, -1, -1, -1, 20,
- 21, 22, -1, -1, -1, -1, -1, -1, 29, 30,
- 31, 32, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 43, -1, -1, -1, 47, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 59, -1,
- -1, -1, -1, -1, 65, 66, 67, 68, 69, 70,
- 71, -1, 73, 74, 75, 76, 77, 78, -1, -1,
- 81, 82, 83, 84, 85, 86, -1, -1, -1, -1,
- -1, -1, 93, 94, 95, -1, -1, -1, -1, -1,
+ -1, -1, 94, 95, 96, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 4, 5, 6, -1, -1, 9,
10, 11, -1, -1, 14, -1, 16, -1, -1, -1,
20, 21, 22, -1, -1, -1, -1, -1, -1, 29,
30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 43, -1, -1, -1, 47, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 59,
+ -1, -1, -1, -1, -1, 55, -1, -1, -1, 59,
-1, -1, -1, -1, -1, 65, 66, 67, 68, 69,
70, 71, -1, 73, 74, 75, 76, 77, 78, -1,
-1, 81, 82, 83, 84, 85, 86, -1, -1, -1,
- -1, -1, -1, 93, 94, 95, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 4, 5, 6, -1, -1,
- 9, 10, 11, -1, -1, 14, -1, 16, -1, -1,
- -1, 20, 21, 22, -1, -1, -1, -1, -1, -1,
- 29, 30, 31, 32, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 43, -1, -1, -1, 47, -1,
- -1, -1, -1, -1, -1, -1, 55, -1, -1, -1,
- 59, -1, -1, -1, -1, -1, 65, 66, 67, 68,
- 69, 70, 71, -1, 73, 74, 75, 76, 77, 78,
- -1, -1, 81, 82, 83, 84, 85, 86, -1, -1,
- -1, -1, -1, -1, 93, 94, 95, -1, -1, -1,
+ -1, -1, -1, -1, 94, 95, 96, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 4, -1, -1, -1,
-1, 9, -1, 11, 12, 13, 14, -1, -1, -1,
-1, -1, -1, 21, 22, -1, -1, -1, -1, -1,
@@ -973,89 +1004,90 @@ const short QQmlJSGrammar::action_check [] = {
-1, 59, -1, 61, -1, -1, -1, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
78, -1, -1, 81, 82, 83, 84, 85, -1, 87,
- -1, -1, -1, -1, -1, 93, 94, 95, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 4, -1, -1,
- -1, -1, 9, -1, 11, 12, 13, 14, -1, -1,
- -1, -1, -1, -1, 21, 22, -1, -1, -1, -1,
- -1, -1, 29, 30, -1, -1, 33, 34, -1, 36,
- -1, -1, -1, 40, -1, 42, 43, 44, -1, -1,
- 47, -1, -1, -1, 51, -1, 53, -1, -1, -1,
- -1, -1, 59, -1, 61, -1, -1, -1, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, -1, -1, 81, 82, 83, 84, 85, -1,
- 87, -1, -1, -1, -1, -1, 93, 94, 95, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 4, 5,
- 6, -1, -1, 9, 10, 11, 12, 13, 14, -1,
- 16, -1, -1, -1, 20, 21, 22, -1, -1, -1,
- -1, -1, -1, 29, 30, 31, 32, 33, 34, -1,
+ -1, -1, -1, -1, -1, -1, 94, 95, 96, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4, -1,
+ -1, -1, -1, 9, -1, 11, 12, 13, 14, -1,
+ -1, -1, -1, -1, -1, 21, 22, -1, -1, -1,
+ -1, -1, -1, 29, 30, -1, -1, 33, 34, -1,
36, -1, -1, -1, 40, -1, 42, 43, 44, -1,
-1, 47, -1, -1, -1, 51, -1, 53, -1, -1,
-1, -1, -1, 59, -1, 61, -1, -1, -1, 65,
66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
76, 77, 78, -1, -1, 81, 82, 83, 84, 85,
- 86, 87, -1, -1, -1, -1, -1, 93, 94, 95,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 4,
- 5, 6, -1, -1, 9, 10, 11, 12, 13, 14,
- -1, 16, -1, -1, -1, 20, 21, 22, -1, -1,
- -1, -1, -1, -1, 29, 30, 31, 32, 33, 34,
- -1, 36, -1, -1, -1, 40, -1, 42, 43, 44,
- -1, -1, 47, -1, -1, -1, 51, -1, 53, -1,
- 55, -1, -1, -1, 59, -1, 61, -1, -1, -1,
- 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 77, 78, -1, -1, 81, 82, 83, 84,
- 85, 86, 87, -1, -1, -1, -1, -1, 93, 94,
- 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 87, -1, -1, -1, -1, -1, -1, 94, 95,
+ 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4, 5, 6, -1, -1, 9, 10, 11, 12, 13,
+ 14, -1, 16, -1, -1, -1, 20, 21, 22, -1,
+ -1, -1, -1, -1, -1, 29, 30, 31, 32, 33,
+ 34, -1, 36, -1, -1, -1, 40, -1, 42, 43,
+ 44, -1, -1, 47, -1, -1, -1, 51, -1, 53,
+ -1, -1, -1, -1, -1, 59, -1, 61, -1, -1,
+ -1, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, -1, -1, 81, 82, 83,
+ 84, 85, 86, 87, -1, -1, -1, -1, -1, -1,
+ 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4, 5, 6, -1, -1, 9, 10, 11,
+ 12, 13, 14, -1, 16, -1, -1, -1, 20, 21,
+ 22, -1, -1, -1, -1, -1, -1, 29, 30, 31,
+ 32, 33, 34, -1, 36, -1, -1, -1, 40, -1,
+ 42, 43, 44, -1, -1, 47, -1, -1, -1, 51,
+ -1, 53, -1, 55, -1, -1, -1, 59, -1, 61,
+ -1, -1, -1, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, -1, -1, 81,
+ 82, 83, 84, 85, 86, 87, -1, -1, -1, -1,
+ -1, -1, 94, 95, 96, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
- 15, 39, 29, 3, 15, 15, 13, 15, 3, 15,
- 29, 9, 15, 15, 3, 3, 39, 22, 19, 15,
- 19, 3, 15, 15, 15, 11, 3, 74, 15, 19,
- 15, 15, 29, 13, 15, 29, 102, 15, 3, 15,
- 97, 3, 100, 15, -1, 15, 29, 22, 15, 3,
- 3, 15, 3, 22, 15, 15, 22, 15, 15, 3,
- 39, 3, 3, 3, 3, 39, 39, 22, 39, 3,
- 15, 39, 15, 2, -1, 13, 39, 13, 2, 2,
- 39, 13, 13, 39, 2, 15, 15, 39, 20, 3,
- 3, 15, 15, 3, 15, 15, 2, 15, 41, -1,
- 2, 51, 51, 51, 53, 51, 56, 53, 56, 15,
- 48, 41, 48, 15, 51, 15, 51, 48, 51, 56,
- 39, 56, 39, 56, 51, 51, 53, 53, 47, 51,
- 47, 53, 4, 15, 2, 51, 15, 53, 15, 51,
- 40, 15, 51, 15, 53, 4, 51, 15, 53, 15,
- 51, 63, 53, 51, 51, 13, 15, 51, 16, 53,
- 42, 75, 75, 51, 3, 44, 43, 65, 15, 43,
- 67, 91, 13, 61, -1, 16, 42, 15, 51, 15,
- 51, 54, 51, 54, 51, 106, 53, 56, 51, 13,
- 53, 51, 16, 53, 2, 51, 43, 51, 35, 2,
- 56, 15, 39, 51, 42, 59, 42, 15, 56, 51,
- 2, 51, 15, 2, 56, -1, 56, 51, 51, 51,
- 2, 51, 56, 15, 57, 57, 15, 57, 51, 4,
- 51, 2, -1, 15, 57, 56, 75, 2, 51, 51,
- 15, 53, 55, 2, 15, 51, 51, 2, 53, 55,
- 15, 51, 51, 53, 53, 51, 15, 53, 51, 2,
- 15, 51, 55, 51, 51, 15, 56, 2, 56, 56,
- -1, 3, 15, 51, 64, 89, -1, 51, 56, 51,
- 15, 68, 56, -1, 56, 73, 58, 51, 66, -1,
- -1, 51, 56, -1, 44, 45, 56, 51, 58, 73,
- 51, -1, 56, 51, 58, 56, 51, 51, 56, 73,
- 51, 56, 56, 58, 13, 56, -1, -1, 62, 60,
- -1, 20, 73, 13, 5, 73, 16, 5, 18, -1,
- -1, -1, 13, 32, 33, 13, -1, -1, -1, 20,
- -1, -1, 20, 75, -1, -1, -1, -1, -1, 39,
- 85, 32, 33, -1, 32, 33, 22, 23, 24, 25,
- 26, 27, 28, 21, 22, 23, 24, 25, 26, 27,
- 28, 13, -1, -1, -1, -1, 2, -1, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, -1, -1, 15,
+ 42, 3, 18, 25, 18, 3, 18, 3, 18, 22,
+ 18, 3, 18, 22, 32, 32, 42, 18, 18, 18,
+ 3, 32, 25, 18, 18, 32, 3, 18, 32, 105,
+ 18, 18, 25, 100, 3, 3, 3, 18, 3, 25,
+ 18, 3, 18, 18, 18, 42, 3, 3, 103, 9,
+ 3, 14, 42, 42, 18, 25, 14, 42, 42, 18,
+ 42, 3, 42, 18, 18, 3, 18, 3, 18, 14,
+ 42, 22, 18, 2, 4, 18, 42, 18, 2, 11,
+ 12, 54, -1, 54, 2, 56, 59, 18, 18, 18,
+ 4, 14, 14, 54, 18, 56, 19, 14, 77, 14,
+ 18, 23, 2, 46, 18, 54, 54, 54, 2, 2,
+ 59, 59, 59, 18, 54, 54, 3, 56, 18, 59,
+ 54, 54, 56, 56, 18, 18, 54, 54, 54, 56,
+ 56, 59, 18, 54, 51, 56, 51, 2, 54, 2,
+ 56, 54, 54, 56, 56, 54, 54, 56, 38, 2,
+ 58, 54, 42, 18, 57, 18, 3, 54, 2, 45,
+ 18, 92, 54, 54, 2, 18, 3, 18, 109, 66,
+ 42, 54, 64, 56, 18, 18, 18, 2, 50, 70,
+ 18, 54, 42, 4, 54, 43, 56, 18, 14, 94,
+ 50, 78, 2, 18, 45, 68, 18, 18, 54, 18,
+ 56, 3, 54, 46, 46, 54, 54, 59, 18, 54,
+ 2, 60, 60, 44, 54, 60, 56, 2, 14, 14,
+ 3, 54, 44, 19, 19, 51, 18, 60, 47, 2,
+ 54, 78, 18, 18, 54, -1, 56, 54, 62, 56,
+ 54, 54, 18, 18, 58, 18, 59, 54, 54, 54,
+ 57, 54, 58, 54, 59, 54, 59, 54, 59, 45,
+ 59, 54, 59, 54, 2, 2, 59, -1, 59, 45,
+ 61, -1, 47, 48, 2, -1, 78, 54, -1, 76,
+ 18, 18, 59, 76, 54, -1, 54, 54, 54, 59,
+ 18, 59, 59, 59, -1, 78, -1, -1, 54, 76,
+ 54, 69, -1, 59, 71, 59, 76, 61, 54, 54,
+ 76, 67, 54, 59, 59, 61, 5, 59, 54, 61,
+ 65, 14, 5, 59, -1, 14, 19, 63, 21, -1,
+ -1, 14, -1, -1, 23, -1, -1, -1, -1, -1,
+ 23, -1, -1, -1, -1, -1, 35, 36, -1, 42,
+ 88, 88, 35, 36, 25, 26, 27, 28, 29, 30,
+ 31, 24, 25, 26, 27, 28, 29, 30, 31, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 14, 14, -1, -1, -1, -1, -1,
+ -1, -1, 23, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, -1, -1, 35, 36, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 85,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 13, -1, -1, -1, -1, -1, -1, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, -1, -1,
+ 14, -1, -1, -1, -1, -1, -1, -1, -1, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
diff --git a/src/qml/parser/qqmljsgrammar_p.h b/src/qml/parser/qqmljsgrammar_p.h
index 9ef4695d69..054b7cc2e0 100644
--- a/src/qml/parser/qqmljsgrammar_p.h
+++ b/src/qml/parser/qqmljsgrammar_p.h
@@ -63,12 +63,12 @@ class QQmlJSGrammar
public:
enum VariousConstants {
EOF_SYMBOL = 0,
- REDUCE_HERE = 104,
- SHIFT_THERE = 103,
+ REDUCE_HERE = 105,
+ SHIFT_THERE = 104,
T_AND = 1,
T_AND_AND = 2,
T_AND_EQ = 3,
- T_AS = 92,
+ T_AS = 93,
T_AUTOMATIC_SEMICOLON = 62,
T_BREAK = 4,
T_CASE = 5,
@@ -90,19 +90,19 @@ public:
T_EQ = 17,
T_EQ_EQ = 18,
T_EQ_EQ_EQ = 19,
- T_ERROR = 96,
+ T_ERROR = 97,
T_FALSE = 83,
- T_FEED_JS_EXPRESSION = 100,
- T_FEED_JS_PROGRAM = 102,
- T_FEED_JS_SOURCE_ELEMENT = 101,
- T_FEED_JS_STATEMENT = 99,
- T_FEED_UI_OBJECT_MEMBER = 98,
- T_FEED_UI_PROGRAM = 97,
+ T_FEED_JS_EXPRESSION = 101,
+ T_FEED_JS_PROGRAM = 103,
+ T_FEED_JS_SOURCE_ELEMENT = 102,
+ T_FEED_JS_STATEMENT = 100,
+ T_FEED_UI_OBJECT_MEMBER = 99,
+ T_FEED_UI_PROGRAM = 98,
T_FINALLY = 20,
T_FOR = 21,
T_FUNCTION = 22,
T_GE = 23,
- T_GET = 94,
+ T_GET = 95,
T_GT = 24,
T_GT_GT = 25,
T_GT_GT_EQ = 26,
@@ -130,13 +130,14 @@ public:
T_NOT_EQ_EQ = 46,
T_NULL = 81,
T_NUMERIC_LITERAL = 47,
- T_ON = 93,
+ T_ON = 94,
T_OR = 48,
T_OR_EQ = 49,
T_OR_OR = 50,
T_PLUS = 51,
T_PLUS_EQ = 52,
T_PLUS_PLUS = 53,
+ T_PRAGMA = 92,
T_PROPERTY = 66,
T_PUBLIC = 90,
T_QUESTION = 54,
@@ -149,7 +150,7 @@ public:
T_RETURN = 59,
T_RPAREN = 60,
T_SEMICOLON = 61,
- T_SET = 95,
+ T_SET = 96,
T_SIGNAL = 67,
T_STAR = 63,
T_STAR_EQ = 64,
@@ -168,15 +169,15 @@ public:
T_XOR = 79,
T_XOR_EQ = 80,
- ACCEPT_STATE = 655,
- RULE_COUNT = 351,
- STATE_COUNT = 656,
- TERMINAL_COUNT = 105,
- NON_TERMINAL_COUNT = 108,
+ ACCEPT_STATE = 663,
+ RULE_COUNT = 357,
+ STATE_COUNT = 664,
+ TERMINAL_COUNT = 106,
+ NON_TERMINAL_COUNT = 111,
- GOTO_INDEX_OFFSET = 656,
- GOTO_INFO_OFFSET = 2970,
- GOTO_CHECK_OFFSET = 2970
+ GOTO_INDEX_OFFSET = 664,
+ GOTO_INFO_OFFSET = 3104,
+ GOTO_CHECK_OFFSET = 3104
};
static const char *const spell [];
diff --git a/src/qml/parser/qqmljskeywords_p.h b/src/qml/parser/qqmljskeywords_p.h
index 7fcf001303..c6277e0fcc 100644
--- a/src/qml/parser/qqmljskeywords_p.h
+++ b/src/qml/parser/qqmljskeywords_p.h
@@ -436,6 +436,17 @@ static inline int classify6(const QChar *s, bool qmlMode) {
}
}
}
+ else if (s[1].unicode() == 'r') {
+ if (s[2].unicode() == 'a') {
+ if (s[3].unicode() == 'g') {
+ if (s[4].unicode() == 'm') {
+ if (s[5].unicode() == 'a') {
+ return qmlMode ? Lexer::T_PRAGMA : Lexer::T_IDENTIFIER;
+ }
+ }
+ }
+ }
+ }
}
else if (s[0].unicode() == 'r') {
if (s[1].unicode() == 'e') {
diff --git a/src/qml/parser/qqmljsparser.cpp b/src/qml/parser/qqmljsparser.cpp
index 07944c5f23..75f0f743b8 100644
--- a/src/qml/parser/qqmljsparser.cpp
+++ b/src/qml/parser/qqmljsparser.cpp
@@ -147,6 +147,19 @@ AST::UiQualifiedId *Parser::reparseAsQualifiedId(AST::ExpressionNode *expr)
return 0;
}
+AST::UiQualifiedPragmaId *Parser::reparseAsQualifiedPragmaId(AST::ExpressionNode *expr)
+{
+ if (AST::IdentifierExpression *idExpr = AST::cast<AST::IdentifierExpression *>(expr)) {
+ AST::UiQualifiedPragmaId *q = new (pool) AST::UiQualifiedPragmaId(idExpr->name);
+ q->identifierToken = idExpr->identifierToken;
+
+ return q->finish();
+ }
+
+ return 0;
+}
+
+
bool Parser::parse(int startToken)
{
Lexer *lexer = driver->lexer();
@@ -233,32 +246,44 @@ case 5: {
} break;
case 6: {
- sym(1).UiProgram = new (pool) AST::UiProgram(sym(1).UiImportList,
+ sym(1).UiProgram = new (pool) AST::UiProgram(sym(1).UiHeaderItemList,
sym(2).UiObjectMemberList->finish());
} break;
case 8: {
- sym(1).Node = sym(1).UiImportList->finish();
+ sym(1).Node = sym(1).UiHeaderItemList->finish();
} break;
case 9: {
- sym(1).Node = new (pool) AST::UiImportList(sym(1).UiImport);
+ sym(1).Node = new (pool) AST::UiHeaderItemList(sym(1).UiPragma);
} break;
case 10: {
- sym(1).Node = new (pool) AST::UiImportList(sym(1).UiImportList, sym(2).UiImport);
+ sym(1).Node = new (pool) AST::UiHeaderItemList(sym(1).UiImport);
+} break;
+
+case 11: {
+ sym(1).Node = new (pool) AST::UiHeaderItemList(sym(1).UiHeaderItemList, sym(2).UiPragma);
} break;
-case 13: {
+case 12: {
+ sym(1).Node = new (pool) AST::UiHeaderItemList(sym(1).UiHeaderItemList, sym(2).UiImport);
+} break;
+
+case 16: {
+ sym(1).UiPragma->semicolonToken = loc(2);
+} break;
+
+case 18: {
sym(1).UiImport->semicolonToken = loc(2);
} break;
-case 15: {
+case 20: {
sym(1).UiImport->versionToken = loc(2);
sym(1).UiImport->semicolonToken = loc(3);
} break;
-case 17: {
+case 22: {
sym(1).UiImport->versionToken = loc(2);
sym(1).UiImport->asToken = loc(3);
sym(1).UiImport->importIdToken = loc(4);
@@ -266,14 +291,33 @@ case 17: {
sym(1).UiImport->semicolonToken = loc(5);
} break;
-case 19: {
+case 24: {
sym(1).UiImport->asToken = loc(2);
sym(1).UiImport->importIdToken = loc(3);
sym(1).UiImport->importId = stringRef(3);
sym(1).UiImport->semicolonToken = loc(4);
} break;
-case 20: {
+case 25: {
+ AST::UiPragma *node = 0;
+
+ if (AST::UiQualifiedPragmaId *qualifiedId = reparseAsQualifiedPragmaId(sym(2).Expression)) {
+ node = new (pool) AST::UiPragma(qualifiedId);
+ }
+
+ sym(1).Node = node;
+
+ if (node) {
+ node->pragmaToken = loc(1);
+ } else {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1),
+ QLatin1String("Expected a qualified name id")));
+
+ return false; // ### remove me
+ }
+} break;
+
+case 26: {
AST::UiImport *node = 0;
if (AST::StringLiteral *importIdLiteral = AST::cast<AST::StringLiteral *>(sym(2).Expression)) {
@@ -296,56 +340,56 @@ case 20: {
}
} break;
-case 21: {
+case 27: {
sym(1).Node = 0;
} break;
-case 22: {
+case 28: {
sym(1).Node = new (pool) AST::UiObjectMemberList(sym(1).UiObjectMember);
} break;
-case 23: {
+case 29: {
sym(1).Node = new (pool) AST::UiObjectMemberList(sym(1).UiObjectMember);
} break;
-case 24: {
+case 30: {
AST::UiObjectMemberList *node = new (pool) AST:: UiObjectMemberList(
sym(1).UiObjectMemberList, sym(2).UiObjectMember);
sym(1).Node = node;
} break;
-case 25: {
+case 31: {
sym(1).Node = new (pool) AST::UiArrayMemberList(sym(1).UiObjectMember);
} break;
-case 26: {
+case 32: {
AST::UiArrayMemberList *node = new (pool) AST::UiArrayMemberList(
sym(1).UiArrayMemberList, sym(3).UiObjectMember);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 27: {
+case 33: {
AST::UiObjectInitializer *node = new (pool) AST::UiObjectInitializer((AST::UiObjectMemberList*)0);
node->lbraceToken = loc(1);
node->rbraceToken = loc(2);
sym(1).Node = node;
} break;
-case 28: {
+case 34: {
AST::UiObjectInitializer *node = new (pool) AST::UiObjectInitializer(sym(2).UiObjectMemberList->finish());
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
-case 29: {
+case 35: {
AST::UiObjectDefinition *node = new (pool) AST::UiObjectDefinition(sym(1).UiQualifiedId,
sym(2).UiObjectInitializer);
sym(1).Node = node;
} break;
-case 31: {
+case 37: {
AST::UiArrayBinding *node = new (pool) AST::UiArrayBinding(
sym(1).UiQualifiedId, sym(4).UiArrayMemberList->finish());
node->colonToken = loc(2);
@@ -354,14 +398,14 @@ case 31: {
sym(1).Node = node;
} break;
-case 32: {
+case 38: {
AST::UiObjectBinding *node = new (pool) AST::UiObjectBinding(
sym(1).UiQualifiedId, sym(3).UiQualifiedId, sym(4).UiObjectInitializer);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 33: {
+case 39: {
AST::UiObjectBinding *node = new (pool) AST::UiObjectBinding(
sym(3).UiQualifiedId, sym(1).UiQualifiedId, sym(4).UiObjectInitializer);
node->colonToken = loc(2);
@@ -369,7 +413,7 @@ case 33: {
sym(1).Node = node;
} break;
-case 41:
+case 47:
{
AST::UiScriptBinding *node = new (pool) AST::UiScriptBinding(
sym(1).UiQualifiedId, sym(3).Statement);
@@ -377,22 +421,22 @@ case 41:
sym(1).Node = node;
} break;
-case 45: {
+case 51: {
sym(1).Node = 0;
} break;
-case 46: {
+case 52: {
sym(1).Node = sym(1).UiParameterList->finish ();
} break;
-case 47: {
+case 53: {
AST::UiParameterList *node = new (pool) AST::UiParameterList(stringRef(1), stringRef(2));
node->propertyTypeToken = loc(1);
node->identifierToken = loc(2);
sym(1).Node = node;
} break;
-case 48: {
+case 54: {
AST::UiParameterList *node = new (pool) AST::UiParameterList(sym(1).UiParameterList, stringRef(3), stringRef(4));
node->propertyTypeToken = loc(3);
node->commaToken = loc(2);
@@ -400,7 +444,7 @@ case 48: {
sym(1).Node = node;
} break;
-case 50: {
+case 56: {
AST::UiPublicMember *node = new (pool) AST::UiPublicMember(QStringRef(), stringRef(2));
node->type = AST::UiPublicMember::Signal;
node->propertyToken = loc(1);
@@ -411,7 +455,7 @@ case 50: {
sym(1).Node = node;
} break;
-case 52: {
+case 58: {
AST::UiPublicMember *node = new (pool) AST::UiPublicMember(QStringRef(), stringRef(2));
node->type = AST::UiPublicMember::Signal;
node->propertyToken = loc(1);
@@ -421,7 +465,7 @@ case 52: {
sym(1).Node = node;
} break;
-case 54: {
+case 60: {
AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(4), stringRef(6));
node->typeModifier = stringRef(2);
node->propertyToken = loc(1);
@@ -432,7 +476,7 @@ case 54: {
sym(1).Node = node;
} break;
-case 56: {
+case 62: {
AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(2), stringRef(3));
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -441,7 +485,7 @@ case 56: {
sym(1).Node = node;
} break;
-case 58: {
+case 64: {
AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4));
node->isDefaultMember = true;
node->defaultToken = loc(1);
@@ -452,7 +496,7 @@ case 58: {
sym(1).Node = node;
} break;
-case 59: {
+case 65: {
AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(2), stringRef(3),
sym(5).Statement);
node->propertyToken = loc(1);
@@ -462,7 +506,7 @@ case 59: {
sym(1).Node = node;
} break;
-case 60: {
+case 66: {
AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4),
sym(6).Statement);
node->isReadonlyMember = true;
@@ -474,7 +518,7 @@ case 60: {
sym(1).Node = node;
} break;
-case 61: {
+case 67: {
AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4),
sym(6).Statement);
node->isDefaultMember = true;
@@ -486,7 +530,7 @@ case 61: {
sym(1).Node = node;
} break;
-case 62: {
+case 68: {
AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(4), stringRef(6));
node->typeModifier = stringRef(2);
node->propertyToken = loc(1);
@@ -510,7 +554,7 @@ case 62: {
sym(1).Node = node;
} break;
-case 63: {
+case 69: {
AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(2), stringRef(3));
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -530,57 +574,57 @@ case 63: {
sym(1).Node = node;
} break;
-case 64: {
+case 70: {
sym(1).Node = new (pool) AST::UiSourceElement(sym(1).Node);
} break;
-case 65: {
+case 71: {
sym(1).Node = new (pool) AST::UiSourceElement(sym(1).Node);
} break;
-case 73: {
+case 79: {
AST::ThisExpression *node = new (pool) AST::ThisExpression();
node->thisToken = loc(1);
sym(1).Node = node;
} break;
-case 74: {
+case 80: {
AST::IdentifierExpression *node = new (pool) AST::IdentifierExpression(stringRef(1));
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 75: {
+case 81: {
AST::NullExpression *node = new (pool) AST::NullExpression();
node->nullToken = loc(1);
sym(1).Node = node;
} break;
-case 76: {
+case 82: {
AST::TrueLiteral *node = new (pool) AST::TrueLiteral();
node->trueToken = loc(1);
sym(1).Node = node;
} break;
-case 77: {
+case 83: {
AST::FalseLiteral *node = new (pool) AST::FalseLiteral();
node->falseToken = loc(1);
sym(1).Node = node;
} break;
-case 78: {
+case 84: {
AST::NumericLiteral *node = new (pool) AST::NumericLiteral(sym(1).dval);
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 79:
-case 80: {
+case 85:
+case 86: {
AST::StringLiteral *node = new (pool) AST::StringLiteral(stringRef(1));
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 81: {
+case 87: {
bool rx = lexer->scanRegExp(Lexer::NoPrefix);
if (!rx) {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
@@ -596,7 +640,7 @@ case 81: {
sym(1).Node = node;
} break;
-case 82: {
+case 88: {
bool rx = lexer->scanRegExp(Lexer::EqualPrefix);
if (!rx) {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
@@ -612,28 +656,28 @@ case 82: {
sym(1).Node = node;
} break;
-case 83: {
+case 89: {
AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral((AST::Elision *) 0);
node->lbracketToken = loc(1);
node->rbracketToken = loc(2);
sym(1).Node = node;
} break;
-case 84: {
+case 90: {
AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).Elision->finish());
node->lbracketToken = loc(1);
node->rbracketToken = loc(3);
sym(1).Node = node;
} break;
-case 85: {
+case 91: {
AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).ElementList->finish ());
node->lbracketToken = loc(1);
node->rbracketToken = loc(3);
sym(1).Node = node;
} break;
-case 86: {
+case 92: {
AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).ElementList->finish (),
(AST::Elision *) 0);
node->lbracketToken = loc(1);
@@ -642,7 +686,7 @@ case 86: {
sym(1).Node = node;
} break;
-case 87: {
+case 93: {
AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).ElementList->finish (),
sym(4).Elision->finish());
node->lbracketToken = loc(1);
@@ -651,7 +695,7 @@ case 87: {
sym(1).Node = node;
} break;
-case 88: {
+case 94: {
AST::ObjectLiteral *node = 0;
if (sym(2).Node)
node = new (pool) AST::ObjectLiteral(
@@ -663,7 +707,7 @@ case 88: {
sym(1).Node = node;
} break;
-case 89: {
+case 95: {
AST::ObjectLiteral *node = new (pool) AST::ObjectLiteral(
sym(2).PropertyAssignmentList->finish ());
node->lbraceToken = loc(1);
@@ -671,14 +715,14 @@ case 89: {
sym(1).Node = node;
} break;
-case 90: {
+case 96: {
AST::NestedExpression *node = new (pool) AST::NestedExpression(sym(2).Expression);
node->lparenToken = loc(1);
node->rparenToken = loc(3);
sym(1).Node = node;
} break;
-case 91: {
+case 97: {
if (AST::ArrayMemberExpression *mem = AST::cast<AST::ArrayMemberExpression *>(sym(1).Expression)) {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, mem->lbracketToken,
QLatin1String("Ignored annotation")));
@@ -698,48 +742,48 @@ case 91: {
}
} break;
-case 92: {
+case 98: {
sym(1).Node = new (pool) AST::ElementList((AST::Elision *) 0, sym(1).Expression);
} break;
-case 93: {
+case 99: {
sym(1).Node = new (pool) AST::ElementList(sym(1).Elision->finish(), sym(2).Expression);
} break;
-case 94: {
+case 100: {
AST::ElementList *node = new (pool) AST::ElementList(sym(1).ElementList,
(AST::Elision *) 0, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 95: {
+case 101: {
AST::ElementList *node = new (pool) AST::ElementList(sym(1).ElementList, sym(3).Elision->finish(),
sym(4).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 96: {
+case 102: {
AST::Elision *node = new (pool) AST::Elision();
node->commaToken = loc(1);
sym(1).Node = node;
} break;
-case 97: {
+case 103: {
AST::Elision *node = new (pool) AST::Elision(sym(1).Elision);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 98: {
+case 104: {
AST::PropertyNameAndValue *node = new (pool) AST::PropertyNameAndValue(
sym(1).PropertyName, sym(3).Expression);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 99: {
+case 105: {
AST::PropertyGetterSetter *node = new (pool) AST::PropertyGetterSetter(
sym(2).PropertyName, sym(6).FunctionBody);
node->getSetToken = loc(1);
@@ -750,7 +794,7 @@ case 99: {
sym(1).Node = node;
} break;
-case 100: {
+case 106: {
AST::PropertyGetterSetter *node = new (pool) AST::PropertyGetterSetter(
sym(2).PropertyName, sym(4).FormalParameterList, sym(7).FunctionBody);
node->getSetToken = loc(1);
@@ -761,56 +805,56 @@ case 100: {
sym(1).Node = node;
} break;
-case 101: {
+case 107: {
sym(1).Node = new (pool) AST::PropertyAssignmentList(sym(1).PropertyAssignment);
} break;
-case 102: {
+case 108: {
AST::PropertyAssignmentList *node = new (pool) AST::PropertyAssignmentList(
sym(1).PropertyAssignmentList, sym(3).PropertyAssignment);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 103: {
+case 109: {
AST::IdentifierPropertyName *node = new (pool) AST::IdentifierPropertyName(stringRef(1));
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 104: {
+case 110: {
AST::StringLiteralPropertyName *node = new (pool) AST::StringLiteralPropertyName(stringRef(1));
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 105: {
+case 111: {
AST::NumericLiteralPropertyName *node = new (pool) AST::NumericLiteralPropertyName(sym(1).dval);
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 106: {
+case 112: {
AST::IdentifierPropertyName *node = new (pool) AST::IdentifierPropertyName(stringRef(1));
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 142: {
+case 148: {
AST::ArrayMemberExpression *node = new (pool) AST::ArrayMemberExpression(sym(1).Expression, sym(3).Expression);
node->lbracketToken = loc(2);
node->rbracketToken = loc(4);
sym(1).Node = node;
} break;
-case 143: {
+case 149: {
AST::FieldMemberExpression *node = new (pool) AST::FieldMemberExpression(sym(1).Expression, stringRef(3));
node->dotToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 144: {
+case 150: {
AST::NewMemberExpression *node = new (pool) AST::NewMemberExpression(sym(2).Expression, sym(4).ArgumentList);
node->newToken = loc(1);
node->lparenToken = loc(3);
@@ -818,384 +862,384 @@ case 144: {
sym(1).Node = node;
} break;
-case 146: {
+case 152: {
AST::NewExpression *node = new (pool) AST::NewExpression(sym(2).Expression);
node->newToken = loc(1);
sym(1).Node = node;
} break;
-case 147: {
+case 153: {
AST::CallExpression *node = new (pool) AST::CallExpression(sym(1).Expression, sym(3).ArgumentList);
node->lparenToken = loc(2);
node->rparenToken = loc(4);
sym(1).Node = node;
} break;
-case 148: {
+case 154: {
AST::CallExpression *node = new (pool) AST::CallExpression(sym(1).Expression, sym(3).ArgumentList);
node->lparenToken = loc(2);
node->rparenToken = loc(4);
sym(1).Node = node;
} break;
-case 149: {
+case 155: {
AST::ArrayMemberExpression *node = new (pool) AST::ArrayMemberExpression(sym(1).Expression, sym(3).Expression);
node->lbracketToken = loc(2);
node->rbracketToken = loc(4);
sym(1).Node = node;
} break;
-case 150: {
+case 156: {
AST::FieldMemberExpression *node = new (pool) AST::FieldMemberExpression(sym(1).Expression, stringRef(3));
node->dotToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 151: {
+case 157: {
sym(1).Node = 0;
} break;
-case 152: {
+case 158: {
sym(1).Node = sym(1).ArgumentList->finish();
} break;
-case 153: {
+case 159: {
sym(1).Node = new (pool) AST::ArgumentList(sym(1).Expression);
} break;
-case 154: {
+case 160: {
AST::ArgumentList *node = new (pool) AST::ArgumentList(sym(1).ArgumentList, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 158: {
+case 164: {
AST::PostIncrementExpression *node = new (pool) AST::PostIncrementExpression(sym(1).Expression);
node->incrementToken = loc(2);
sym(1).Node = node;
} break;
-case 159: {
+case 165: {
AST::PostDecrementExpression *node = new (pool) AST::PostDecrementExpression(sym(1).Expression);
node->decrementToken = loc(2);
sym(1).Node = node;
} break;
-case 161: {
+case 167: {
AST::DeleteExpression *node = new (pool) AST::DeleteExpression(sym(2).Expression);
node->deleteToken = loc(1);
sym(1).Node = node;
} break;
-case 162: {
+case 168: {
AST::VoidExpression *node = new (pool) AST::VoidExpression(sym(2).Expression);
node->voidToken = loc(1);
sym(1).Node = node;
} break;
-case 163: {
+case 169: {
AST::TypeOfExpression *node = new (pool) AST::TypeOfExpression(sym(2).Expression);
node->typeofToken = loc(1);
sym(1).Node = node;
} break;
-case 164: {
+case 170: {
AST::PreIncrementExpression *node = new (pool) AST::PreIncrementExpression(sym(2).Expression);
node->incrementToken = loc(1);
sym(1).Node = node;
} break;
-case 165: {
+case 171: {
AST::PreDecrementExpression *node = new (pool) AST::PreDecrementExpression(sym(2).Expression);
node->decrementToken = loc(1);
sym(1).Node = node;
} break;
-case 166: {
+case 172: {
AST::UnaryPlusExpression *node = new (pool) AST::UnaryPlusExpression(sym(2).Expression);
node->plusToken = loc(1);
sym(1).Node = node;
} break;
-case 167: {
+case 173: {
AST::UnaryMinusExpression *node = new (pool) AST::UnaryMinusExpression(sym(2).Expression);
node->minusToken = loc(1);
sym(1).Node = node;
} break;
-case 168: {
+case 174: {
AST::TildeExpression *node = new (pool) AST::TildeExpression(sym(2).Expression);
node->tildeToken = loc(1);
sym(1).Node = node;
} break;
-case 169: {
+case 175: {
AST::NotExpression *node = new (pool) AST::NotExpression(sym(2).Expression);
node->notToken = loc(1);
sym(1).Node = node;
} break;
-case 171: {
+case 177: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Mul, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 172: {
+case 178: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Div, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 173: {
+case 179: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Mod, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 175: {
+case 181: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Add, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 176: {
+case 182: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Sub, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 178: {
+case 184: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::LShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 179: {
+case 185: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::RShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 180: {
+case 186: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::URShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 182: {
+case 188: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Lt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 183: {
+case 189: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Gt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 184: {
+case 190: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Le, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 185: {
+case 191: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Ge, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 186: {
+case 192: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::InstanceOf, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 187: {
+case 193: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::In, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 189: {
+case 195: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Lt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 190: {
+case 196: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Gt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 191: {
+case 197: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Le, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 192: {
+case 198: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Ge, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 193: {
+case 199: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::InstanceOf, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 195: {
+case 201: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Equal, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 196: {
+case 202: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::NotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 197: {
+case 203: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::StrictEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 198: {
+case 204: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::StrictNotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 200: {
+case 206: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Equal, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 201: {
+case 207: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::NotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 202: {
+case 208: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::StrictEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 203: {
+case 209: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::StrictNotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 205: {
+case 211: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitAnd, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 207: {
+case 213: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitAnd, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 209: {
+case 215: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitXor, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 211: {
+case 217: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitXor, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 213: {
+case 219: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitOr, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 215: {
+case 221: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitOr, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 217: {
+case 223: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::And, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 219: {
+case 225: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::And, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 221: {
+case 227: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Or, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 223: {
+case 229: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Or, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 225: {
+case 231: {
AST::ConditionalExpression *node = new (pool) AST::ConditionalExpression(sym(1).Expression,
sym(3).Expression, sym(5).Expression);
node->questionToken = loc(2);
@@ -1203,7 +1247,7 @@ case 225: {
sym(1).Node = node;
} break;
-case 227: {
+case 233: {
AST::ConditionalExpression *node = new (pool) AST::ConditionalExpression(sym(1).Expression,
sym(3).Expression, sym(5).Expression);
node->questionToken = loc(2);
@@ -1211,112 +1255,112 @@ case 227: {
sym(1).Node = node;
} break;
-case 229: {
+case 235: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
sym(2).ival, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 231: {
+case 237: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
sym(2).ival, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 232: {
+case 238: {
sym(1).ival = QSOperator::Assign;
} break;
-case 233: {
+case 239: {
sym(1).ival = QSOperator::InplaceMul;
} break;
-case 234: {
+case 240: {
sym(1).ival = QSOperator::InplaceDiv;
} break;
-case 235: {
+case 241: {
sym(1).ival = QSOperator::InplaceMod;
} break;
-case 236: {
+case 242: {
sym(1).ival = QSOperator::InplaceAdd;
} break;
-case 237: {
+case 243: {
sym(1).ival = QSOperator::InplaceSub;
} break;
-case 238: {
+case 244: {
sym(1).ival = QSOperator::InplaceLeftShift;
} break;
-case 239: {
+case 245: {
sym(1).ival = QSOperator::InplaceRightShift;
} break;
-case 240: {
+case 246: {
sym(1).ival = QSOperator::InplaceURightShift;
} break;
-case 241: {
+case 247: {
sym(1).ival = QSOperator::InplaceAnd;
} break;
-case 242: {
+case 248: {
sym(1).ival = QSOperator::InplaceXor;
} break;
-case 243: {
+case 249: {
sym(1).ival = QSOperator::InplaceOr;
} break;
-case 245: {
+case 251: {
AST::Expression *node = new (pool) AST::Expression(sym(1).Expression, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 246: {
+case 252: {
sym(1).Node = 0;
} break;
-case 249: {
+case 255: {
AST::Expression *node = new (pool) AST::Expression(sym(1).Expression, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 250: {
+case 256: {
sym(1).Node = 0;
} break;
-case 267: {
+case 273: {
AST::Block *node = new (pool) AST::Block(sym(2).StatementList);
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
-case 268: {
+case 274: {
sym(1).Node = new (pool) AST::StatementList(sym(1).Statement);
} break;
-case 269: {
+case 275: {
sym(1).Node = new (pool) AST::StatementList(sym(1).StatementList, sym(2).Statement);
} break;
-case 270: {
+case 276: {
sym(1).Node = 0;
} break;
-case 271: {
+case 277: {
sym(1).Node = sym(1).StatementList->finish ();
} break;
-case 273: {
+case 279: {
AST::VariableStatement *node = new (pool) AST::VariableStatement(
sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST));
node->declarationKindToken = loc(1);
@@ -1324,76 +1368,76 @@ case 273: {
sym(1).Node = node;
} break;
-case 274: {
+case 280: {
sym(1).ival = T_CONST;
} break;
-case 275: {
+case 281: {
sym(1).ival = T_VAR;
} break;
-case 276: {
+case 282: {
sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclaration);
} break;
-case 277: {
+case 283: {
AST::VariableDeclarationList *node = new (pool) AST::VariableDeclarationList(
sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 278: {
+case 284: {
sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclaration);
} break;
-case 279: {
+case 285: {
sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
} break;
-case 280: {
+case 286: {
AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 281: {
+case 287: {
AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 282: {
+case 288: {
// ### TODO: AST for initializer
sym(1) = sym(2);
} break;
-case 283: {
+case 289: {
sym(1).Node = 0;
} break;
-case 285: {
+case 291: {
// ### TODO: AST for initializer
sym(1) = sym(2);
} break;
-case 286: {
+case 292: {
sym(1).Node = 0;
} break;
-case 288: {
+case 294: {
AST::EmptyStatement *node = new (pool) AST::EmptyStatement();
node->semicolonToken = loc(1);
sym(1).Node = node;
} break;
-case 290: {
+case 296: {
AST::ExpressionStatement *node = new (pool) AST::ExpressionStatement(sym(1).Expression);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 291: {
+case 297: {
AST::IfStatement *node = new (pool) AST::IfStatement(sym(3).Expression, sym(5).Statement, sym(7).Statement);
node->ifToken = loc(1);
node->lparenToken = loc(2);
@@ -1402,7 +1446,7 @@ case 291: {
sym(1).Node = node;
} break;
-case 292: {
+case 298: {
AST::IfStatement *node = new (pool) AST::IfStatement(sym(3).Expression, sym(5).Statement);
node->ifToken = loc(1);
node->lparenToken = loc(2);
@@ -1410,7 +1454,7 @@ case 292: {
sym(1).Node = node;
} break;
-case 295: {
+case 301: {
AST::DoWhileStatement *node = new (pool) AST::DoWhileStatement(sym(2).Statement, sym(5).Expression);
node->doToken = loc(1);
node->whileToken = loc(3);
@@ -1420,7 +1464,7 @@ case 295: {
sym(1).Node = node;
} break;
-case 296: {
+case 302: {
AST::WhileStatement *node = new (pool) AST::WhileStatement(sym(3).Expression, sym(5).Statement);
node->whileToken = loc(1);
node->lparenToken = loc(2);
@@ -1428,7 +1472,7 @@ case 296: {
sym(1).Node = node;
} break;
-case 297: {
+case 303: {
AST::ForStatement *node = new (pool) AST::ForStatement(sym(3).Expression,
sym(5).Expression, sym(7).Expression, sym(9).Statement);
node->forToken = loc(1);
@@ -1439,7 +1483,7 @@ case 297: {
sym(1).Node = node;
} break;
-case 298: {
+case 304: {
AST::LocalForStatement *node = new (pool) AST::LocalForStatement(
sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression,
sym(8).Expression, sym(10).Statement);
@@ -1452,7 +1496,7 @@ case 298: {
sym(1).Node = node;
} break;
-case 299: {
+case 305: {
AST:: ForEachStatement *node = new (pool) AST::ForEachStatement(sym(3).Expression,
sym(5).Expression, sym(7).Statement);
node->forToken = loc(1);
@@ -1462,7 +1506,7 @@ case 299: {
sym(1).Node = node;
} break;
-case 300: {
+case 306: {
AST::LocalForEachStatement *node = new (pool) AST::LocalForEachStatement(
sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement);
node->forToken = loc(1);
@@ -1473,14 +1517,14 @@ case 300: {
sym(1).Node = node;
} break;
-case 302: {
+case 308: {
AST::ContinueStatement *node = new (pool) AST::ContinueStatement();
node->continueToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 304: {
+case 310: {
AST::ContinueStatement *node = new (pool) AST::ContinueStatement(stringRef(2));
node->continueToken = loc(1);
node->identifierToken = loc(2);
@@ -1488,14 +1532,14 @@ case 304: {
sym(1).Node = node;
} break;
-case 306: {
+case 312: {
AST::BreakStatement *node = new (pool) AST::BreakStatement(QStringRef());
node->breakToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 308: {
+case 314: {
AST::BreakStatement *node = new (pool) AST::BreakStatement(stringRef(2));
node->breakToken = loc(1);
node->identifierToken = loc(2);
@@ -1503,14 +1547,14 @@ case 308: {
sym(1).Node = node;
} break;
-case 310: {
+case 316: {
AST::ReturnStatement *node = new (pool) AST::ReturnStatement(sym(2).Expression);
node->returnToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
-case 311: {
+case 317: {
AST::WithStatement *node = new (pool) AST::WithStatement(sym(3).Expression, sym(5).Statement);
node->withToken = loc(1);
node->lparenToken = loc(2);
@@ -1522,7 +1566,7 @@ case 311: {
}
} break;
-case 312: {
+case 318: {
AST::SwitchStatement *node = new (pool) AST::SwitchStatement(sym(3).Expression, sym(5).CaseBlock);
node->switchToken = loc(1);
node->lparenToken = loc(2);
@@ -1530,83 +1574,83 @@ case 312: {
sym(1).Node = node;
} break;
-case 313: {
+case 319: {
AST::CaseBlock *node = new (pool) AST::CaseBlock(sym(2).CaseClauses);
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
-case 314: {
+case 320: {
AST::CaseBlock *node = new (pool) AST::CaseBlock(sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses);
node->lbraceToken = loc(1);
node->rbraceToken = loc(5);
sym(1).Node = node;
} break;
-case 315: {
+case 321: {
sym(1).Node = new (pool) AST::CaseClauses(sym(1).CaseClause);
} break;
-case 316: {
+case 322: {
sym(1).Node = new (pool) AST::CaseClauses(sym(1).CaseClauses, sym(2).CaseClause);
} break;
-case 317: {
+case 323: {
sym(1).Node = 0;
} break;
-case 318: {
+case 324: {
sym(1).Node = sym(1).CaseClauses->finish ();
} break;
-case 319: {
+case 325: {
AST::CaseClause *node = new (pool) AST::CaseClause(sym(2).Expression, sym(4).StatementList);
node->caseToken = loc(1);
node->colonToken = loc(3);
sym(1).Node = node;
} break;
-case 320: {
+case 326: {
AST::DefaultClause *node = new (pool) AST::DefaultClause(sym(3).StatementList);
node->defaultToken = loc(1);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 321: {
+case 327: {
AST::LabelledStatement *node = new (pool) AST::LabelledStatement(stringRef(1), sym(3).Statement);
node->identifierToken = loc(1);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 323: {
+case 329: {
AST::ThrowStatement *node = new (pool) AST::ThrowStatement(sym(2).Expression);
node->throwToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
-case 324: {
+case 330: {
AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Catch);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 325: {
+case 331: {
AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Finally);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 326: {
+case 332: {
AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Catch, sym(4).Finally);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 327: {
+case 333: {
AST::Catch *node = new (pool) AST::Catch(stringRef(3), sym(5).Block);
node->catchToken = loc(1);
node->lparenToken = loc(2);
@@ -1615,20 +1659,20 @@ case 327: {
sym(1).Node = node;
} break;
-case 328: {
+case 334: {
AST::Finally *node = new (pool) AST::Finally(sym(2).Block);
node->finallyToken = loc(1);
sym(1).Node = node;
} break;
-case 330: {
+case 336: {
AST::DebuggerStatement *node = new (pool) AST::DebuggerStatement();
node->debuggerToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 332: {
+case 338: {
AST::FunctionDeclaration *node = new (pool) AST::FunctionDeclaration(stringRef(2), sym(4).FormalParameterList, sym(7).FunctionBody);
node->functionToken = loc(1);
node->identifierToken = loc(2);
@@ -1639,7 +1683,7 @@ case 332: {
sym(1).Node = node;
} break;
-case 333: {
+case 339: {
AST::FunctionExpression *node = new (pool) AST::FunctionExpression(stringRef(2), sym(4).FormalParameterList, sym(7).FunctionBody);
node->functionToken = loc(1);
if (! stringRef(2).isNull())
@@ -1651,7 +1695,7 @@ case 333: {
sym(1).Node = node;
} break;
-case 334: {
+case 340: {
AST::FunctionExpression *node = new (pool) AST::FunctionExpression(QStringRef(), sym(3).FormalParameterList, sym(6).FunctionBody);
node->functionToken = loc(1);
node->lparenToken = loc(2);
@@ -1661,56 +1705,56 @@ case 334: {
sym(1).Node = node;
} break;
-case 335: {
+case 341: {
AST::FormalParameterList *node = new (pool) AST::FormalParameterList(stringRef(1));
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 336: {
+case 342: {
AST::FormalParameterList *node = new (pool) AST::FormalParameterList(sym(1).FormalParameterList, stringRef(3));
node->commaToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 337: {
+case 343: {
sym(1).Node = 0;
} break;
-case 338: {
+case 344: {
sym(1).Node = sym(1).FormalParameterList->finish ();
} break;
-case 339: {
+case 345: {
sym(1).Node = 0;
} break;
-case 341: {
+case 347: {
sym(1).Node = new (pool) AST::FunctionBody(sym(1).SourceElements->finish ());
} break;
-case 343: {
+case 349: {
sym(1).Node = new (pool) AST::Program(sym(1).SourceElements->finish ());
} break;
-case 344: {
+case 350: {
sym(1).Node = new (pool) AST::SourceElements(sym(1).SourceElement);
} break;
-case 345: {
+case 351: {
sym(1).Node = new (pool) AST::SourceElements(sym(1).SourceElements, sym(2).SourceElement);
} break;
-case 346: {
+case 352: {
sym(1).Node = new (pool) AST::StatementSourceElement(sym(1).Statement);
} break;
-case 347: {
+case 353: {
sym(1).Node = new (pool) AST::FunctionSourceElement(sym(1).FunctionDeclaration);
} break;
-case 348: {
+case 354: {
sym(1).Node = 0;
} break;
diff --git a/src/qml/parser/qqmljsparser_p.h b/src/qml/parser/qqmljsparser_p.h
index 6edfd844d0..bf963718fb 100644
--- a/src/qml/parser/qqmljsparser_p.h
+++ b/src/qml/parser/qqmljsparser_p.h
@@ -112,7 +112,8 @@ public:
AST::VariableDeclarationList *VariableDeclarationList;
AST::UiProgram *UiProgram;
- AST::UiImportList *UiImportList;
+ AST::UiHeaderItemList *UiHeaderItemList;
+ AST::UiPragma *UiPragma;
AST::UiImport *UiImport;
AST::UiParameterList *UiParameterList;
AST::UiPublicMember *UiPublicMember;
@@ -125,6 +126,7 @@ public:
AST::UiObjectMemberList *UiObjectMemberList;
AST::UiArrayMemberList *UiArrayMemberList;
AST::UiQualifiedId *UiQualifiedId;
+ AST::UiQualifiedPragmaId *UiQualifiedPragmaId;
};
public:
@@ -206,6 +208,7 @@ protected:
{ return location_stack [tos + index - 1]; }
AST::UiQualifiedId *reparseAsQualifiedId(AST::ExpressionNode *expr);
+ AST::UiQualifiedPragmaId *reparseAsQualifiedPragmaId(AST::ExpressionNode *expr);
protected:
Engine *driver;
@@ -245,9 +248,9 @@ protected:
-#define J_SCRIPT_REGEXPLITERAL_RULE1 81
+#define J_SCRIPT_REGEXPLITERAL_RULE1 87
-#define J_SCRIPT_REGEXPLITERAL_RULE2 82
+#define J_SCRIPT_REGEXPLITERAL_RULE2 88
QT_QML_END_NAMESPACE
diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp
index 8a0e015827..08ae37e747 100644
--- a/src/qml/qml/qqmlcompiler.cpp
+++ b/src/qml/qml/qqmlcompiler.cpp
@@ -821,6 +821,10 @@ bool QQmlCompiler::compile(QQmlEngine *engine,
QQmlScript::TypeReference *parserRef = referencedTypes.at(ii);
if (tref.typeData) { //QML-based type
+ if (tref.type->isCompositeSingleton()) {
+ QString err = tr( "Composite Singleton Type %1 is not creatable.").arg(tref.type->qmlTypeName());
+ COMPILE_EXCEPTION(parserRef->firstUse, err);
+ }
ref.component = tref.typeData->compiledData();
ref.component->addref();
} else if (tref.type) {//C++-based type
@@ -886,6 +890,12 @@ void QQmlCompiler::compileTree(QQmlScript::Object *tree)
output->importCache->add(ns);
}
+ // Add any Composite Singletons that were used to the import cache
+ for (int i = 0; i < unit->compositeSingletons().count(); ++i) {
+ output->importCache->add(unit->compositeSingletons().at(i).type->qmlTypeName(),
+ unit->compositeSingletons().at(i).type->sourceUrl(), unit->compositeSingletons().at(i).prefix);
+ }
+
int scriptIndex = 0;
foreach (const QQmlTypeData::ScriptReference &script, unit->resolvedScripts()) {
QString qualifier = script.qualifier;
@@ -2546,7 +2556,7 @@ bool QQmlCompiler::testQualifiedEnumAssignment(QQmlScript::Property *prop,
if (!type && typeName != QLatin1String("Qt"))
return true;
- if (type && type->isComposite()) //No enums on composite types
+ if (type && type->isComposite()) //No enums on composite (or composite singleton) types
return true;
int value = 0;
@@ -2984,6 +2994,8 @@ bool QQmlCompiler::buildDynamicMeta(QQmlScript::Object *obj, DynamicMetaMode mod
if (!unit->imports().resolveType(s->parameterTypeNames.at(i).toString(), &qmltype, 0, 0, 0))
COMPILE_EXCEPTION(s, tr("Invalid signal parameter type: %1").arg(s->parameterTypeNames.at(i).toString()));
+ // We dont mind even if the composite type ends up being composite singleton, here
+ // we just acquire the metaTypeId.
if (qmltype->isComposite()) {
QQmlTypeData *tdata = enginePrivate->typeLoader.getType(qmltype->sourceUrl());
Q_ASSERT(tdata);
diff --git a/src/qml/qml/qqmldirparser.cpp b/src/qml/qml/qqmldirparser.cpp
index 8fcab2e570..b23b760b78 100644
--- a/src/qml/qml/qqmldirparser.cpp
+++ b/src/qml/qml/qqmldirparser.cpp
@@ -116,7 +116,7 @@ bool QQmlDirParser::parse(const QString &source)
if (ch->isNull())
break;
- QString sections[3];
+ QString sections[4];
int sectionCount = 0;
do {
@@ -126,7 +126,7 @@ bool QQmlDirParser::parse(const QString &source)
}
const QChar *start = ch;
scanWord(ch);
- if (sectionCount < 3) {
+ if (sectionCount < 4) {
sections[sectionCount++] = source.mid(start-source.constData(), ch-start);
} else {
reportError(lineNumber, start-lineStart, QLatin1String("unexpected token"));
@@ -167,7 +167,7 @@ bool QQmlDirParser::parse(const QString &source)
_typeNamespace = sections[1];
} else if (sections[0] == QLatin1String("plugin")) {
- if (sectionCount < 2) {
+ if (sectionCount < 2 || sectionCount > 3) {
reportError(lineNumber, 0,
QString::fromUtf8("plugin directive requires one or two arguments, but %1 were provided").arg(sectionCount - 1));
@@ -187,6 +187,43 @@ bool QQmlDirParser::parse(const QString &source)
Component entry(sections[1], sections[2], -1, -1);
entry.internal = true;
_components.insertMulti(entry.typeName, entry);
+ } else if (sections[0] == QLatin1String("singleton")) {
+ if (sectionCount < 3 || sectionCount > 4) {
+ reportError(lineNumber, 0,
+ QString::fromUtf8("singleton types require 2 or 3 arguments, but %1 were provided").arg(sectionCount - 1));
+ continue;
+ } else if (sectionCount == 3) {
+ // handle qmldir directory listing case where singleton is defined in the following pattern:
+ // singleton TestSingletonType TestSingletonType.qml
+ Component entry(sections[1], sections[2], -1, -1);
+ entry.singleton = true;
+ _components.insertMulti(entry.typeName, entry);
+ } else {
+ // handle qmldir module listing case where singleton is defined in the following pattern:
+ // singleton TestSingletonType 2.0 TestSingletonType20.qml
+ const QString &version = sections[2];
+ const int dotIndex = version.indexOf(QLatin1Char('.'));
+
+ if (dotIndex == -1) {
+ reportError(lineNumber, 0, QLatin1String("expected '.'"));
+ } else if (version.indexOf(QLatin1Char('.'), dotIndex + 1) != -1) {
+ reportError(lineNumber, 0, QLatin1String("unexpected '.'"));
+ } else {
+ bool validVersionNumber = false;
+ const int majorVersion = parseInt(QStringRef(&version, 0, dotIndex), &validVersionNumber);
+
+ if (validVersionNumber) {
+ const int minorVersion = parseInt(QStringRef(&version, dotIndex+1, version.length()-dotIndex-1), &validVersionNumber);
+
+ if (validVersionNumber) {
+ const QString &fileName = sections[3];
+ Component entry(sections[1], fileName, majorVersion, minorVersion);
+ entry.singleton = true;
+ _components.insertMulti(entry.typeName, entry);
+ }
+ }
+ }
+ }
} else if (sections[0] == QLatin1String("typeinfo")) {
if (sectionCount != 2) {
reportError(lineNumber, 0,
diff --git a/src/qml/qml/qqmldirparser_p.h b/src/qml/qml/qqmldirparser_p.h
index ddc5dbce16..e3607d1e72 100644
--- a/src/qml/qml/qqmldirparser_p.h
+++ b/src/qml/qml/qqmldirparser_p.h
@@ -93,17 +93,18 @@ public:
struct Component
{
Component()
- : majorVersion(0), minorVersion(0), internal(false) {}
+ : majorVersion(0), minorVersion(0), internal(false), singleton(false) {}
Component(const QString &typeName, const QString &fileName, int majorVersion, int minorVersion)
: typeName(typeName), fileName(fileName), majorVersion(majorVersion), minorVersion(minorVersion),
- internal(false) {}
+ internal(false), singleton(false) {}
QString typeName;
QString fileName;
int majorVersion;
int minorVersion;
bool internal;
+ bool singleton;
};
struct Script
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index e970ffec59..3caaa02e3b 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -129,25 +129,36 @@ bool isPathAbsolute(const QString &path)
}
// If the type does not already exist as a file import, add the type and return the new type
-QQmlType *getTypeForUrl(const QString &urlString, const QHashedStringRef& typeName, QList<QQmlError> *errors)
+QQmlType *getTypeForUrl(const QString &urlString, const QHashedStringRef& typeName, bool isCompositeSingleton, QList<QQmlError> *errors)
{
QUrl url(urlString);
QQmlType *ret = QQmlMetaType::qmlType(url);
- if (!ret) { //QQmlType not yet existing for composite type
+ if (!ret) { //QQmlType not yet existing for composite or composite singleton type
int dot = typeName.indexOf(QLatin1Char('.'));
QHashedStringRef unqualifiedtype = dot < 0 ? typeName : QHashedStringRef(typeName.constData() + dot + 1, typeName.length() - dot - 1);
//XXX: The constData of the string ref is pointing somewhere unsafe in qmlregister, so we need to create a temporary copy
QByteArray buf(unqualifiedtype.toString().toUtf8());
- QQmlPrivate::RegisterCompositeType reg = {
- url,
- "", //Empty URI indicates loaded via file imports
- -1,
- -1,
- buf.constData()
- };
- ret = QQmlMetaType::qmlTypeFromIndex(QQmlPrivate::qmlregister(QQmlPrivate::CompositeRegistration, &reg));
+ if (isCompositeSingleton) {
+ QQmlPrivate::RegisterCompositeSingletonType reg = {
+ url,
+ "", //Empty URI indicates loaded via file imports
+ -1,
+ -1,
+ buf.constData()
+ };
+ ret = QQmlMetaType::qmlTypeFromIndex(QQmlPrivate::qmlregister(QQmlPrivate::CompositeSingletonRegistration, &reg));
+ } else {
+ QQmlPrivate::RegisterCompositeType reg = {
+ url,
+ "", //Empty URI indicates loaded via file imports
+ -1,
+ -1,
+ buf.constData()
+ };
+ ret = QQmlMetaType::qmlTypeFromIndex(QQmlPrivate::qmlregister(QQmlPrivate::CompositeRegistration, &reg));
+ }
}
if (!ret) {//Usually when a type name is "found" but invalid
//qDebug() << ret << urlString << QQmlMetaType::qmlType(url);
@@ -158,10 +169,9 @@ QQmlType *getTypeForUrl(const QString &urlString, const QHashedStringRef& typeNa
errors->prepend(error);
}
return ret;
-
}
-}
+} // namespace
struct RegisteredPlugin {
QString uri;
@@ -362,6 +372,61 @@ void QQmlImports::populateCache(QQmlTypeNameCache *cache) const
}
}
+// We need to exclude the entry for the current baseUrl. This can happen for example
+// when handling qmldir files on the remote dir case and the current type is marked as
+// singleton.
+bool excludeBaseUrl(const QString &importUrl, const QString &fileName, const QString baseUrl)
+{
+ if (importUrl.isEmpty())
+ return false;
+
+ if (baseUrl.startsWith(importUrl))
+ {
+ QString typeUrl(importUrl);
+ typeUrl.append(fileName);
+ if (typeUrl == baseUrl)
+ return false;
+ }
+
+ return true;
+}
+
+void findCompositeSingletons(const QQmlImportNamespace &set, QList<QQmlImports::CompositeSingletonReference> &resultList, QUrl baseUrl)
+{
+ typedef QQmlDirComponents::const_iterator ConstIterator;
+
+ for (int ii = set.imports.count() - 1; ii >= 0; --ii) {
+ const QQmlImportNamespace::Import *import = set.imports.at(ii);
+
+ const QQmlDirComponents &components = import->qmlDirComponents;
+
+ ConstIterator cend = components.constEnd();
+ for (ConstIterator cit = components.constBegin(); cit != cend; ++cit) {
+ if (cit->singleton && excludeBaseUrl(import->url, cit->fileName, baseUrl.toString())) {
+ QQmlImports::CompositeSingletonReference ref;
+ ref.typeName = cit->typeName;
+ ref.prefix = set.prefix;
+ resultList.append(ref);
+ }
+ }
+ }
+}
+
+QList<QQmlImports::CompositeSingletonReference> QQmlImports::resolvedCompositeSingletons() const
+{
+ QList<QQmlImports::CompositeSingletonReference> compositeSingletons;
+
+ const QQmlImportNamespace &set = d->unqualifiedset;
+ findCompositeSingletons(set, compositeSingletons, baseUrl());
+
+ for (QQmlImportNamespace *ns = d->qualifiedSets.first(); ns; ns = d->qualifiedSets.next(ns)) {
+ const QQmlImportNamespace &set = *ns;
+ findCompositeSingletons(set, compositeSingletons, baseUrl());
+ }
+
+ return compositeSingletons;
+}
+
QList<QQmlImports::ScriptReference> QQmlImports::resolvedScripts() const
{
QList<QQmlImports::ScriptReference> scripts;
@@ -452,7 +517,9 @@ bool QQmlImports::resolveType(const QHashedStringRef &type,
#define RESOLVE_TYPE_DEBUG qDebug().nospace() << "QQmlImports(" << qPrintable(baseUrl().toString()) \
<< ')' << "::resolveType: " << type.toString() << " => "
- if (type_return && *type_return && (*type_return)->isComposite())
+ if (type_return && *type_return && (*type_return)->isCompositeSingleton())
+ RESOLVE_TYPE_DEBUG << (*type_return)->typeName() << ' ' << (*type_return)->sourceUrl() << " TYPE/URL-SINGLETON";
+ else if (type_return && *type_return && (*type_return)->isComposite())
RESOLVE_TYPE_DEBUG << (*type_return)->typeName() << ' ' << (*type_return)->sourceUrl() << " TYPE/URL";
else if (type_return && *type_return)
RESOLVE_TYPE_DEBUG << (*type_return)->typeName() << " TYPE";
@@ -544,6 +611,7 @@ bool QQmlImportNamespace::Import::resolveType(QQmlTypeLoader *typeLoader,
QQmlDirComponents::ConstIterator it = qmlDirComponents.find(type), end = qmlDirComponents.end();
if (it != end) {
QString componentUrl;
+ bool isCompositeSingleton = false;
QQmlDirComponents::ConstIterator candidate = end;
for ( ; it != end && it.key() == type; ++it) {
const QQmlDirParser::Component &c = *it;
@@ -568,13 +636,14 @@ bool QQmlImportNamespace::Import::resolveType(QQmlTypeLoader *typeLoader,
// This is our best candidate so far
candidate = it;
+ isCompositeSingleton = c.singleton;
}
}
}
if (candidate != end) {
if (type_return)
- *type_return = getTypeForUrl(componentUrl, type, 0);
+ *type_return = getTypeForUrl(componentUrl, type, isCompositeSingleton, 0);
return (*type_return != 0);
}
} else if (!isLibrary) {
@@ -594,7 +663,7 @@ bool QQmlImportNamespace::Import::resolveType(QQmlTypeLoader *typeLoader,
*typeRecursionDetected = true;
} else {
if (type_return)
- *type_return = getTypeForUrl(qmlUrl, type, 0);
+ *type_return = getTypeForUrl(qmlUrl, type, false, 0);
return (*type_return) != 0;
}
}
@@ -637,7 +706,7 @@ bool QQmlImportsPrivate::resolveType(const QHashedStringRef& type, int *vmajor,
return true;
if (s->imports.count() == 1 && !s->imports.at(0)->isLibrary && type_return && s != &unqualifiedset) {
// qualified, and only 1 url
- *type_return = getTypeForUrl(resolveLocalUrl(s->imports.at(0)->url, unqualifiedtype.toString() + QLatin1String(".qml")), type, errors);
+ *type_return = getTypeForUrl(resolveLocalUrl(s->imports.at(0)->url, unqualifiedtype.toString() + QLatin1String(".qml")), type, false, errors);
return (*type_return != 0);
}
}
diff --git a/src/qml/qml/qqmlimport_p.h b/src/qml/qml/qqmlimport_p.h
index 06b50c09e9..2c3d4a7bca 100644
--- a/src/qml/qml/qqmlimport_p.h
+++ b/src/qml/qml/qqmlimport_p.h
@@ -122,6 +122,14 @@ public:
QList<ScriptReference> resolvedScripts() const;
+ struct CompositeSingletonReference
+ {
+ QString typeName;
+ QString prefix;
+ };
+
+ QList<CompositeSingletonReference> resolvedCompositeSingletons() const;
+
static QString completeQmldirPath(const QString &uri, const QString &base, int vmaj, int vmin,
QQmlImports::ImportVersion version);
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index f9583e7a59..342d1dc69c 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -63,6 +63,7 @@
#include <qvector.h>
#include <ctype.h>
+#include "qqmlcomponent.h"
QT_BEGIN_NAMESPACE
@@ -77,6 +78,10 @@ struct QQmlMetaTypeData
Names nameToType;
typedef QHash<QUrl, QQmlType *> Files; //For file imported composite types only
Files urlToType;
+ Files urlToNonFileImportType; // For non-file imported composite and composite
+ // singleton types. This way we can locate any
+ // of them by url, even if it was registered as
+ // a module via qmlRegisterCompositeType.
typedef QHash<const QMetaObject *, QQmlType *> MetaObjects;
MetaObjects metaObjectToType;
typedef QHash<int, QQmlMetaType::StringConverter> StringConverters;
@@ -225,6 +230,10 @@ void QQmlType::SingletonInstanceInfo::init(QQmlEngine *e)
setScriptApi(e, scriptCallback(e, e));
} else if (qobjectCallback && !qobjectApi(e)) {
setQObjectApi(e, qobjectCallback(e, e));
+ } else if (!url.isEmpty() && !qobjectApi(e)) {
+ QQmlComponent component(e, url, QQmlComponent::PreferSynchronous);
+ QObject *o = component.create();
+ setQObjectApi(e, o);
}
v4->popContext();
}
@@ -279,6 +288,7 @@ QQmlTypePrivate::QQmlTypePrivate(QQmlType::RegistrationType type)
extraData.cd->propertyValueInterceptorCast = -1;
break;
case QQmlType::SingletonType:
+ case QQmlType::CompositeSingletonType:
extraData.sd = new QQmlSingletonTypeData;
extraData.sd->singletonInstanceInfo = 0;
break;
@@ -300,6 +310,7 @@ QQmlTypePrivate::~QQmlTypePrivate()
delete extraData.cd;
break;
case QQmlType::SingletonType:
+ case QQmlType::CompositeSingletonType:
delete extraData.sd->singletonInstanceInfo;
delete extraData.sd;
break;
@@ -351,6 +362,22 @@ QQmlType::QQmlType(int index, const QString &elementName, const QQmlPrivate::Reg
= (type.qobjectApi && type.version >= 1) ? type.instanceMetaObject : 0;
}
+QQmlType::QQmlType(int index, const QString &elementName, const QQmlPrivate::RegisterCompositeSingletonType &type)
+ : d(new QQmlTypePrivate(CompositeSingletonType))
+{
+ d->elementName = elementName;
+ d->module = QString::fromUtf8(type.uri);
+
+ d->version_maj = type.versionMajor;
+ d->version_min = type.versionMinor;
+
+ d->index = index;
+
+ d->extraData.sd->singletonInstanceInfo = new SingletonInstanceInfo;
+ d->extraData.sd->singletonInstanceInfo->url = type.url;
+ d->extraData.sd->singletonInstanceInfo->typeName = QString::fromUtf8(type.typeName);
+}
+
QQmlType::QQmlType(int index, const QString &elementName, const QQmlPrivate::RegisterType &type)
: d(new QQmlTypePrivate(CppType))
{
@@ -650,7 +677,7 @@ void QQmlTypePrivate::insertEnums(const QMetaObject *metaObject) const
QByteArray QQmlType::typeName() const
{
- if (d->regType == SingletonType)
+ if (d->regType == SingletonType || d->regType == CompositeSingletonType)
return d->extraData.sd->singletonInstanceInfo->typeName.toUtf8();
else if (d->baseMetaObject)
return d->baseMetaObject->className();
@@ -710,7 +737,7 @@ void QQmlType::create(QObject **out, void **memory, size_t additionalMemory) con
QQmlType::SingletonInstanceInfo *QQmlType::singletonInstanceInfo() const
{
- if (d->regType != SingletonType)
+ if (d->regType != SingletonType && d->regType != CompositeSingletonType)
return 0;
return d->extraData.sd->singletonInstanceInfo;
}
@@ -757,7 +784,7 @@ bool QQmlType::isExtendedType() const
bool QQmlType::isSingleton() const
{
- return d->regType == SingletonType;
+ return d->regType == SingletonType || d->regType == CompositeSingletonType;
}
bool QQmlType::isInterface() const
@@ -767,7 +794,12 @@ bool QQmlType::isInterface() const
bool QQmlType::isComposite() const
{
- return d->regType == CompositeType;
+ return d->regType == CompositeType || d->regType == CompositeSingletonType;
+}
+
+bool QQmlType::isCompositeSingleton() const
+{
+ return d->regType == CompositeSingletonType;
}
int QQmlType::typeId() const
@@ -869,9 +901,12 @@ int QQmlType::index() const
QUrl QQmlType::sourceUrl() const
{
- if (d->regType != CompositeType)
+ if (d->regType == CompositeType)
+ return d->extraData.fd->url;
+ else if (d->regType == CompositeSingletonType)
+ return d->extraData.sd->singletonInstanceInfo->url;
+ else
return QUrl();
- return d->extraData.fd->url;
}
int QQmlType::enumValue(const QHashedStringRef &name, bool *ok) const
@@ -1006,7 +1041,6 @@ QList<QQmlType*> QQmlTypeModule::singletonTypes(int minor) const
return retn;
}
-
QQmlTypeModuleVersion::QQmlTypeModuleVersion()
: m_module(0), m_minor(0)
{
@@ -1070,6 +1104,7 @@ void qmlClearTypeRegistrations() // Declared in qqml.h
data->idToType.clear();
data->nameToType.clear();
data->urlToType.clear();
+ data->urlToNonFileImportType.clear();
data->metaObjectToType.clear();
data->uriToModule.clear();
@@ -1123,6 +1158,8 @@ QString registrationTypeString(QQmlType::RegistrationType typeType)
typeStr = QStringLiteral("element");
else if (typeType == QQmlType::SingletonType)
typeStr = QStringLiteral("singleton type");
+ else if (typeType == QQmlType::CompositeSingletonType)
+ typeStr = QStringLiteral("composite singleton type");
else
typeStr = QStringLiteral("type");
return typeStr;
@@ -1254,6 +1291,31 @@ int registerSingletonType(const QQmlPrivate::RegisterSingletonType &type)
return index;
}
+int registerCompositeSingletonType(const QQmlPrivate::RegisterCompositeSingletonType &type)
+{
+ // Assumes URL is absolute and valid. Checking of user input should happen before the URL enters type.
+ QWriteLocker lock(metaTypeDataLock());
+ QQmlMetaTypeData *data = metaTypeData();
+ QString typeName = QString::fromUtf8(type.typeName);
+ bool fileImport = false;
+ if (*(type.uri) == '\0')
+ fileImport = true;
+ if (!checkRegistration(QQmlType::CompositeSingletonType, data, fileImport ? 0 : type.uri, typeName))
+ return -1;
+
+ int index = data->types.count();
+
+ QQmlType *dtype = new QQmlType(index, typeName, type);
+
+ data->types.append(dtype);
+ addTypeToData(dtype, data);
+
+ QQmlMetaTypeData::Files *files = fileImport ? &(data->urlToType) : &(data->urlToNonFileImportType);
+ files->insertMulti(type.url, dtype);
+
+ return index;
+}
+
int registerCompositeType(const QQmlPrivate::RegisterCompositeType &type)
{
// Assumes URL is absolute and valid. Checking of user input should happen before the URL enters type.
@@ -1272,8 +1334,8 @@ int registerCompositeType(const QQmlPrivate::RegisterCompositeType &type)
data->types.append(dtype);
addTypeToData(dtype, data);
- if (fileImport)
- data->urlToType.insertMulti(type.url, dtype);
+ QQmlMetaTypeData::Files *files = fileImport ? &(data->urlToType) : &(data->urlToNonFileImportType);
+ files->insertMulti(type.url, dtype);
return index;
}
@@ -1295,6 +1357,8 @@ int QQmlPrivate::qmlregister(RegistrationType type, void *data)
return registerSingletonType(*reinterpret_cast<RegisterSingletonType *>(data));
} else if (type == CompositeRegistration) {
return registerCompositeType(*reinterpret_cast<RegisterCompositeType *>(data));
+ } else if (type == CompositeSingletonRegistration) {
+ return registerCompositeSingletonType(*reinterpret_cast<RegisterCompositeSingletonType *>(data));
}
return -1;
}
@@ -1708,12 +1772,15 @@ QQmlType *QQmlMetaType::qmlType(int userType)
Returns null if no such type is registered.
*/
-QQmlType *QQmlMetaType::qmlType(const QUrl &url)
+QQmlType *QQmlMetaType::qmlType(const QUrl &url, bool includeNonFileImports /* = false */)
{
QReadLocker lock(metaTypeDataLock());
QQmlMetaTypeData *data = metaTypeData();
QQmlType *type = data->urlToType.value(url);
+ if (!type && includeNonFileImports)
+ type = data->urlToNonFileImportType.value(url);
+
if (type && type->sourceUrl() == url)
return type;
else
diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h
index f747049f11..8d6229d82c 100644
--- a/src/qml/qml/qqmlmetatype_p.h
+++ b/src/qml/qml/qqmlmetatype_p.h
@@ -86,7 +86,7 @@ public:
static QQmlType *qmlType(const QMetaObject *);
static QQmlType *qmlType(const QMetaObject *metaObject, const QHashedStringRef &module, int version_major, int version_minor);
static QQmlType *qmlType(int);
- static QQmlType *qmlType(const QUrl &url);
+ static QQmlType *qmlType(const QUrl &url, bool includeNonFileImports = false);
static QQmlType *qmlTypeFromIndex(int);
static QMetaProperty defaultProperty(const QMetaObject *);
@@ -169,6 +169,8 @@ public:
bool isSingleton() const;
bool isInterface() const;
bool isComposite() const;
+ bool isCompositeSingleton() const;
+
int typeId() const;
int qListTypeId() const;
@@ -198,6 +200,7 @@ public:
QObject *(*qobjectCallback)(QQmlEngine *, QJSEngine *);
const QMetaObject *instanceMetaObject;
QString typeName;
+ QUrl url; // used by composite singletons
void setQObjectApi(QQmlEngine *, QObject *);
QObject *qobjectApi(QQmlEngine *) const;
@@ -211,6 +214,7 @@ public:
QHash<QQmlEngine *, QObject *> qobjectApis;
};
SingletonInstanceInfo *singletonInstanceInfo() const;
+
QUrl sourceUrl() const;
int enumValue(const QHashedStringRef &, bool *ok) const;
@@ -225,7 +229,8 @@ private:
CppType = 0,
SingletonType = 1,
InterfaceType = 2,
- CompositeType = 3
+ CompositeType = 3,
+ CompositeSingletonType = 4
};
friend QString registrationTypeString(RegistrationType);
friend bool checkRegistration(RegistrationType, QQmlMetaTypeData *, const char *, const QString &, int);
@@ -233,11 +238,13 @@ private:
friend int registerSingletonType(const QQmlPrivate::RegisterSingletonType &);
friend int registerInterface(const QQmlPrivate::RegisterInterface &);
friend int registerCompositeType(const QQmlPrivate::RegisterCompositeType &);
+ friend int registerCompositeSingletonType(const QQmlPrivate::RegisterCompositeSingletonType &);
friend Q_QML_EXPORT void qmlClearTypeRegistrations();
QQmlType(int, const QQmlPrivate::RegisterInterface &);
QQmlType(int, const QString &, const QQmlPrivate::RegisterSingletonType &);
QQmlType(int, const QString &, const QQmlPrivate::RegisterType &);
QQmlType(int, const QString &, const QQmlPrivate::RegisterCompositeType &);
+ QQmlType(int, const QString &, const QQmlPrivate::RegisterCompositeSingletonType &);
~QQmlType();
QQmlTypePrivate *d;
diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h
index b5b11d2c6a..15306cb131 100644
--- a/src/qml/qml/qqmlprivate.h
+++ b/src/qml/qml/qqmlprivate.h
@@ -260,12 +260,21 @@ namespace QQmlPrivate
const char *typeName;
};
+ struct RegisterCompositeSingletonType {
+ QUrl url;
+ const char *uri;
+ int versionMajor;
+ int versionMinor;
+ const char *typeName;
+ };
+
enum RegistrationType {
TypeRegistration = 0,
InterfaceRegistration = 1,
AutoParentRegistration = 2,
SingletonRegistration = 3,
- CompositeRegistration = 4
+ CompositeRegistration = 4,
+ CompositeSingletonRegistration = 5
};
int Q_QML_EXPORT qmlregister(RegistrationType, void *);
diff --git a/src/qml/qml/qqmlscript.cpp b/src/qml/qml/qqmlscript.cpp
index cac362a959..58aad8eb33 100644
--- a/src/qml/qml/qqmlscript.cpp
+++ b/src/qml/qml/qqmlscript.cpp
@@ -517,6 +517,7 @@ protected:
virtual bool visit(AST::UiProgram *node);
virtual bool visit(AST::UiImport *node);
+ virtual bool visit(AST::UiPragma *node);
virtual bool visit(AST::UiObjectDefinition *node);
virtual bool visit(AST::UiPublicMember *node);
virtual bool visit(AST::UiObjectBinding *node);
@@ -794,10 +795,10 @@ LocationSpan ProcessAST::location(AST::SourceLocation start, AST::SourceLocation
return rv;
}
-// UiProgram: UiImportListOpt UiObjectMemberList ;
+// UiProgram: UiHeaderItemListOpt UiObjectMemberList ;
bool ProcessAST::visit(AST::UiProgram *node)
{
- accept(node->imports);
+ accept(node->headers);
accept(node->members->member);
return false;
}
@@ -889,6 +890,41 @@ bool ProcessAST::visit(AST::UiImport *node)
return false;
}
+bool ProcessAST::visit(AST::UiPragma *node)
+{
+ QQmlScript::Pragma pragma;
+
+ // For now the only valid pragma is Singleton, so lets validate the input
+ if (!node->pragmaType->name.isNull())
+ {
+ if (QLatin1String("Singleton") == node->pragmaType->name.toString())
+ {
+ pragma.type = QQmlScript::Pragma::Singleton;
+ } else {
+ QQmlError error;
+ error.setDescription(QCoreApplication::translate("QQmlParser","Pragma requires a valid qualifier"));
+ error.setLine(node->pragmaToken.startLine);
+ error.setColumn(node->pragmaToken.startColumn);
+ _parser->_errors << error;
+ return false;
+ }
+ } else {
+ QQmlError error;
+ error.setDescription(QCoreApplication::translate("QQmlParser","Pragma requires a valid qualifier"));
+ error.setLine(node->pragmaToken.startLine);
+ error.setColumn(node->pragmaToken.startColumn);
+ _parser->_errors << error;
+ return false;
+ }
+
+ AST::SourceLocation startLoc = node->pragmaToken;
+ AST::SourceLocation endLoc = node->semicolonToken;
+ pragma.location = location(startLoc, endLoc);
+ _parser->_pragmas << pragma;
+
+ return false;
+}
+
bool ProcessAST::visit(AST::UiPublicMember *node)
{
static const struct TypeNameToType {
@@ -1364,6 +1400,11 @@ QList<QQmlScript::Import> QQmlScript::Parser::imports() const
return _imports;
}
+QList<QQmlScript::Pragma> QQmlScript::Parser::pragmas() const
+{
+ return _pragmas;
+}
+
QList<QQmlError> QQmlScript::Parser::errors() const
{
return _errors;
@@ -1416,7 +1457,7 @@ QQmlScript::Object::ScriptBlock::Pragmas QQmlScript::Parser::extractPragmas(QStr
token = l.lex();
- if (token != QQmlJSGrammar::T_IDENTIFIER ||
+ if (token != QQmlJSGrammar::T_PRAGMA ||
l.tokenStartLine() != startLine ||
script.mid(l.tokenOffset(), l.tokenLength()) != pragma)
return rv;
@@ -1506,7 +1547,6 @@ QQmlScript::Parser::JavaScriptMetaData QQmlScript::Parser::extractMetaData(QStri
QQmlScript::Object::ScriptBlock::Pragmas &pragmas = rv.pragmas;
- const QString pragma(QLatin1String("pragma"));
const QString js(QLatin1String(".js"));
const QString library(QLatin1String("library"));
@@ -1681,10 +1721,7 @@ QQmlScript::Parser::JavaScriptMetaData QQmlScript::Parser::extractMetaData(QStri
rv.imports << import;
}
-
- } else if (token == QQmlJSGrammar::T_IDENTIFIER &&
- script.mid(l.tokenOffset(), l.tokenLength()) == pragma) {
-
+ } else if (token == QQmlJSGrammar::T_PRAGMA) {
token = l.lex();
CHECK_TOKEN(T_IDENTIFIER);
@@ -1713,6 +1750,7 @@ QQmlScript::Parser::JavaScriptMetaData QQmlScript::Parser::extractMetaData(QStri
void QQmlScript::Parser::clear()
{
+ _pragmas.clear();
_imports.clear();
_refTypes.clear();
_errors.clear();
diff --git a/src/qml/qml/qqmlscript_p.h b/src/qml/qml/qqmlscript_p.h
index 250c71d6ac..790f1b2b81 100644
--- a/src/qml/qml/qqmlscript_p.h
+++ b/src/qml/qml/qqmlscript_p.h
@@ -120,6 +120,17 @@ public:
QQmlScript::LocationSpan location;
};
+class Pragma
+{
+public:
+ Pragma() : type(Singleton) {}
+
+ enum Type { Singleton };
+ Type type;
+
+ QQmlScript::LocationSpan location;
+};
+
class Object;
class TypeReference : public QQmlPool::Class
{
@@ -474,6 +485,7 @@ public:
QQmlScript::Object *tree() const;
QList<Import> imports() const;
+ QList<Pragma> pragmas() const;
void clear();
@@ -505,6 +517,7 @@ public:
QQmlPool _pool;
QQmlScript::Object *root;
QList<Import> _imports;
+ QList<Pragma> _pragmas;
QList<TypeReference*> _refTypes;
QString _scriptFile;
ParserJsASTData *data;
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 27230cd669..842eb53a3b 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -1172,7 +1172,7 @@ void QQmlDataLoader::shutdownThread()
}
QQmlTypeLoader::Blob::Blob(const QUrl &url, QQmlDataBlob::Type type, QQmlTypeLoader *loader)
-: QQmlDataBlob(url, type), m_typeLoader(loader), m_imports(loader)
+ : QQmlDataBlob(url, type), m_typeLoader(loader), m_imports(loader), m_isSingleton(false)
{
}
@@ -1336,6 +1336,51 @@ bool QQmlTypeLoader::Blob::addImport(const QQmlScript::Import &import, QList<QQm
return true;
}
+bool QQmlTypeLoader::Blob::addPragma(const QQmlScript::Pragma &pragma, QList<QQmlError> *errors)
+{
+ Q_ASSERT(errors);
+
+ if (pragma.type == QQmlScript::Pragma::Singleton) {
+ QUrl myUrl = url();
+
+ QQmlType *ret = QQmlMetaType::qmlType(myUrl, true);
+ if (!ret) {
+ QQmlError error;
+ error.setDescription(QQmlTypeLoader::tr("No matching type found, pragma Singleton files cannot be used by QQmlComponent."));
+ error.setUrl(myUrl);
+ error.setLine(pragma.location.start.line);
+ error.setColumn(pragma.location.start.column);
+ errors->prepend(error);
+ return false;
+ }
+
+ if (!ret->isCompositeSingleton()) {
+ QQmlError error;
+ error.setDescription(QQmlTypeLoader::tr("pragma Singleton used with a non composite singleton type %1").arg(ret->qmlTypeName()));
+ error.setUrl(myUrl);
+ error.setLine(pragma.location.start.line);
+ error.setColumn(pragma.location.start.column);
+ errors->prepend(error);
+ return false;
+ }
+ // This flag is used for error checking when a qmldir file marks a type as
+ // composite singleton, but there is no pragma Singleton defined in QML.
+ m_isSingleton = true;
+ } else {
+ QQmlError error;
+ error.setDescription(QLatin1String("Invalid pragma"));
+ error.setUrl(url());
+ error.setLine(pragma.location.start.line);
+ error.setColumn(pragma.location.start.column);
+ errors->prepend(error);
+ return false;
+ }
+
+ return true;
+}
+
+
+
void QQmlTypeLoader::Blob::dependencyError(QQmlDataBlob *blob)
{
if (blob->type() == QQmlDataBlob::QmldirFile) {
@@ -1941,6 +1986,11 @@ const QSet<QString> &QQmlTypeData::namespaces() const
return m_namespaces;
}
+const QList<QQmlTypeData::TypeReference> &QQmlTypeData::compositeSingletons() const
+{
+ return m_compositeSingletons;
+}
+
QQmlCompiledData *QQmlTypeData::compiledData() const
{
return m_compiledData;
@@ -2015,6 +2065,36 @@ void QQmlTypeData::done()
}
// ---
+ // Check all composite singleton type dependencies for errors
+ for (int ii = 0; !isError() && ii < m_compositeSingletons.count(); ++ii) {
+ const TypeReference &type = m_compositeSingletons.at(ii);
+ Q_ASSERT(!type.typeData || type.typeData->isCompleteOrError());
+ if (type.typeData && type.typeData->isError()) {
+ QString typeName = type.type->qmlTypeName();
+
+ QList<QQmlError> errors = type.typeData->errors();
+ QQmlError error;
+ error.setUrl(finalUrl());
+ error.setLine(type.location.line);
+ error.setColumn(type.location.column);
+ error.setDescription(QQmlTypeLoader::tr("Type %1 unavailable").arg(typeName));
+ errors.prepend(error);
+ setError(errors);
+ }
+ }
+
+ // If the type is CompositeSingleton but there was no pragma Singleton in the
+ // QML file, lets report an error.
+ QQmlType *type = QQmlMetaType::qmlType(url(), true);
+ if (type && type->isCompositeSingleton() && !m_isSingleton) {
+ QString typeName = type->qmlTypeName();
+
+ QQmlError error;
+ error.setDescription(QQmlTypeLoader::tr("qmldir defines type as singleton, but no pragma Singleton found in type %1.").arg(typeName));
+ error.setUrl(finalUrl());
+ setError(error);
+ }
+
// Compile component
if (!isError())
compile();
@@ -2140,6 +2220,14 @@ void QQmlTypeData::dataReceived(const Data &data)
return;
}
}
+
+ foreach (const QQmlScript::Pragma &pragma, scriptParser.pragmas()) {
+ if (!addPragma(pragma, &errors)) {
+ Q_ASSERT(errors.size());
+ setError(errors);
+ return;
+ }
+ }
}
void QQmlTypeData::allDependenciesDone()
@@ -2327,61 +2415,51 @@ void QQmlTypeData::resolveTypes()
m_scripts << ref;
}
- // --- old compiler:
- foreach (QQmlScript::TypeReference *parserRef, scriptParser.referencedTypes()) {
+ // Lets handle resolved composite singleton types
+ foreach (const QQmlImports::CompositeSingletonReference &csRef, m_imports.resolvedCompositeSingletons()) {
TypeReference ref;
+ QQmlScript::TypeReference parserRef;
+ parserRef.name = csRef.typeName;
+ // we are basing our type on the information from qmldir and therefore
+ // do not have a proper location.
+ parserRef.firstUse = NULL;
+
+ if (!csRef.prefix.isEmpty()) {
+ parserRef.name.prepend(csRef.prefix + QLatin1Char('.'));
+ // Add a reference to the enclosing namespace
+ m_namespaces.insert(csRef.prefix);
+ }
int majorVersion = -1;
int minorVersion = -1;
- QQmlImportNamespace *typeNamespace = 0;
- QList<QQmlError> errors;
- bool typeFound = m_imports.resolveType(parserRef->name, &ref.type,
- &majorVersion, &minorVersion, &typeNamespace, &errors);
- if (!typeNamespace && !typeFound && !m_implicitImportLoaded) {
- // Lazy loading of implicit import
- if (loadImplicitImport()) {
- // Try again to find the type
- errors.clear();
- typeFound = m_imports.resolveType(parserRef->name, &ref.type,
- &majorVersion, &minorVersion, &typeNamespace, &errors);
- } else {
- return; //loadImplicitImport() hit an error, and called setError already
- }
+ if (!resolveType(&parserRef, majorVersion, minorVersion, ref))
+ return;
+
+ if (ref.type->isCompositeSingleton()) {
+ ref.typeData = typeLoader()->getType(ref.type->sourceUrl());
+ addDependency(ref.typeData);
+ ref.prefix = csRef.prefix;
+
+ m_compositeSingletons << ref;
}
+ }
- if (!typeFound || typeNamespace) {
- // Known to not be a type:
- // - known to be a namespace (Namespace {})
- // - type with unknown namespace (UnknownNamespace.SomeType {})
- QQmlError error;
- if (typeNamespace) {
- error.setDescription(QQmlTypeLoader::tr("Namespace %1 cannot be used as a type").arg(parserRef->name));
- } else {
- if (errors.size()) {
- error = errors.takeFirst();
- } else {
- // this should not be possible!
- // Description should come from error provided by addImport() function.
- error.setDescription(QQmlTypeLoader::tr("Unreported error adding script import to import database"));
- }
- error.setUrl(m_imports.baseUrl());
- error.setDescription(QQmlTypeLoader::tr("%1 %2").arg(parserRef->name).arg(error.description()));
- }
+ // --- old compiler:
+ foreach (QQmlScript::TypeReference *parserRef, scriptParser.referencedTypes()) {
+ TypeReference ref;
- Q_ASSERT(parserRef->firstUse);
- error.setLine(parserRef->firstUse->location.start.line);
- error.setColumn(parserRef->firstUse->location.start.column);
+ int majorVersion = -1;
+ int minorVersion = -1;
- errors.prepend(error);
- setError(errors);
+ if (!resolveType(parserRef, majorVersion, minorVersion, ref))
return;
- }
if (ref.type->isComposite()) {
ref.typeData = typeLoader()->getType(ref.type->sourceUrl());
addDependency(ref.typeData);
}
+
ref.majorVersion = majorVersion;
ref.minorVersion = minorVersion;
@@ -2466,6 +2544,58 @@ void QQmlTypeData::resolveTypes()
}
}
+bool QQmlTypeData::resolveType(const QQmlScript::TypeReference *parserRef, int &majorVersion, int &minorVersion, TypeReference &ref)
+{
+ QQmlImportNamespace *typeNamespace = 0;
+ QList<QQmlError> errors;
+
+ bool typeFound = m_imports.resolveType(parserRef->name, &ref.type,
+ &majorVersion, &minorVersion, &typeNamespace, &errors);
+ if (!typeNamespace && !typeFound && !m_implicitImportLoaded) {
+ // Lazy loading of implicit import
+ if (loadImplicitImport()) {
+ // Try again to find the type
+ errors.clear();
+ typeFound = m_imports.resolveType(parserRef->name, &ref.type,
+ &majorVersion, &minorVersion, &typeNamespace, &errors);
+ } else {
+ return false; //loadImplicitImport() hit an error, and called setError already
+ }
+ }
+
+ if (!typeFound || typeNamespace) {
+ // Known to not be a type:
+ // - known to be a namespace (Namespace {})
+ // - type with unknown namespace (UnknownNamespace.SomeType {})
+ QQmlError error;
+ if (typeNamespace) {
+ error.setDescription(QQmlTypeLoader::tr("Namespace %1 cannot be used as a type").arg(parserRef->name));
+ } else {
+ if (errors.size()) {
+ error = errors.takeFirst();
+ } else {
+ // this should not be possible!
+ // Description should come from error provided by addImport() function.
+ error.setDescription(QQmlTypeLoader::tr("Unreported error adding script import to import database"));
+ }
+ error.setUrl(m_imports.baseUrl());
+ error.setDescription(QQmlTypeLoader::tr("%1 %2").arg(parserRef->name).arg(error.description()));
+ }
+
+ if (parserRef->firstUse)
+ {
+ error.setLine(parserRef->firstUse->location.start.line);
+ error.setColumn(parserRef->firstUse->location.start.column);
+ }
+
+ errors.prepend(error);
+ setError(errors);
+ return false;
+ }
+
+ return true;
+}
+
void QQmlTypeData::scriptImported(QQmlScriptBlob *blob, const QQmlScript::Location &location, const QString &qualifier, const QString &/*nameSpace*/)
{
ScriptReference ref;
diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h
index fee09d3bdb..a2d07bbe2f 100644
--- a/src/qml/qml/qqmltypeloader_p.h
+++ b/src/qml/qml/qqmltypeloader_p.h
@@ -279,6 +279,7 @@ public:
protected:
bool addImport(const QQmlScript::Import &import, QList<QQmlError> *errors);
+ bool addPragma(const QQmlScript::Pragma &pragma, QList<QQmlError> *errors);
bool fetchQmldir(const QUrl &url, const QQmlScript::Import *import, int priority, QList<QQmlError> *errors);
bool updateQmldir(QQmlQmldirData *data, const QQmlScript::Import *import, QList<QQmlError> *errors);
@@ -294,6 +295,7 @@ public:
protected:
QQmlTypeLoader *m_typeLoader;
QQmlImports m_imports;
+ bool m_isSingleton;
QHash<const QQmlScript::Import *, int> m_unresolvedImports;
QList<QQmlQmldirData *> m_qmldirs;
};
@@ -401,6 +403,7 @@ public:
int majorVersion;
int minorVersion;
QQmlTypeData *typeData;
+ QString prefix; // used by CompositeSingleton types
};
struct ScriptReference
@@ -425,6 +428,7 @@ public:
const QList<TypeReference> &resolvedTypes() const;
const QList<ScriptReference> &resolvedScripts() const;
const QSet<QString> &namespaces() const;
+ const QList<TypeReference> &compositeSingletons() const;
QQmlCompiledData *compiledData() const;
@@ -447,6 +451,7 @@ protected:
private:
void resolveTypes();
void compile();
+ bool resolveType(const QQmlScript::TypeReference *parserRef, int &majorVersion, int &minorVersion, TypeReference &ref);
virtual void scriptImported(QQmlScriptBlob *blob, const QQmlScript::Location &location, const QString &qualifier, const QString &nameSpace);
@@ -459,6 +464,7 @@ private:
QList<ScriptReference> m_scripts;
QSet<QString> m_namespaces;
+ QList<TypeReference> m_compositeSingletons;
// --- old compiler
QList<TypeReference> m_types;
diff --git a/src/qml/qml/qqmltypenamecache.cpp b/src/qml/qml/qqmltypenamecache.cpp
index 38466aa20d..87764c49ae 100644
--- a/src/qml/qml/qqmltypenamecache.cpp
+++ b/src/qml/qml/qqmltypenamecache.cpp
@@ -53,6 +53,21 @@ QQmlTypeNameCache::~QQmlTypeNameCache()
{
}
+void QQmlTypeNameCache::add(const QHashedString &name, const QUrl &url, const QHashedString &nameSpace)
+{
+ if (nameSpace.length() != 0) {
+ Import *i = m_namedImports.value(nameSpace);
+ Q_ASSERT(i != 0);
+ i->compositeSingletons.insert(name, url);
+ return;
+ }
+
+ if (m_anonymousCompositeSingletons.contains(name))
+ return;
+
+ m_anonymousCompositeSingletons.insert(name, url);
+}
+
void QQmlTypeNameCache::add(const QHashedString &name, int importedScriptIndex, const QHashedString &nameSpace)
{
Import import;
@@ -78,6 +93,9 @@ QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name)
if (!result.isValid())
result = typeSearch(m_anonymousImports, name);
+ if (!result.isValid())
+ result = query(m_anonymousCompositeSingletons, name);
+
return result;
}
@@ -88,7 +106,12 @@ QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name,
const Import *i = static_cast<const Import *>(importNamespace);
Q_ASSERT(i->scriptIndex == -1);
- return typeSearch(i->modules, name);
+ Result result = result = typeSearch(i->modules, name);
+
+ if (!result.isValid())
+ result = query(i->compositeSingletons, name);
+
+ return result;
}
QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QV4::String *name)
@@ -98,6 +121,9 @@ QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QV4::String *name)
if (!result.isValid())
result = typeSearch(m_anonymousImports, name);
+ if (!result.isValid())
+ result = query(m_anonymousCompositeSingletons, name);
+
return result;
}
@@ -114,7 +140,12 @@ QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QV4::String *name, cons
return r;
}
- return typeSearch(i->modules, name);
+ Result r = typeSearch(i->modules, name);
+
+ if (!r.isValid())
+ r = query(i->compositeSingletons, name);
+
+ return r;
}
QT_END_NAMESPACE
diff --git a/src/qml/qml/qqmltypenamecache_p.h b/src/qml/qml/qqmltypenamecache_p.h
index 094bd5c777..6be9aadf29 100644
--- a/src/qml/qml/qqmltypenamecache_p.h
+++ b/src/qml/qml/qqmltypenamecache_p.h
@@ -74,6 +74,7 @@ public:
inline bool isEmpty() const;
void add(const QHashedString &name, int sciptIndex = -1, const QHashedString &nameSpace = QHashedString());
+ void add(const QHashedString &name, const QUrl &url, const QHashedString &nameSpace = QHashedString());
struct Result {
inline Result();
@@ -103,6 +104,9 @@ private:
// Or, imported script
int scriptIndex;
+
+ // Or, imported compositeSingletons
+ QStringHash<QUrl> compositeSingletons;
};
template<typename Key>
@@ -121,6 +125,19 @@ private:
}
template<typename Key>
+ Result query(const QStringHash<QUrl> &urls, Key key)
+ {
+ QUrl *url = urls.value(key);
+ if (url) {
+ QQmlType *type = QQmlMetaType::qmlType(*url);
+ if (type)
+ return Result(type);
+ }
+
+ return Result();
+ }
+
+ template<typename Key>
Result typeSearch(const QVector<QQmlTypeModuleVersion> &modules, Key key)
{
QVector<QQmlTypeModuleVersion>::const_iterator end = modules.constEnd();
@@ -135,8 +152,7 @@ private:
QStringHash<Import> m_namedImports;
QMap<const Import *, QStringHash<Import> > m_namespacedImports;
QVector<QQmlTypeModuleVersion> m_anonymousImports;
-
- QQmlEngine *engine;
+ QStringHash<QUrl> m_anonymousCompositeSingletons;
};
QQmlTypeNameCache::Result::Result()
@@ -176,7 +192,8 @@ QQmlTypeNameCache::Import::Import()
bool QQmlTypeNameCache::isEmpty() const
{
- return m_namedImports.isEmpty() && m_anonymousImports.isEmpty();
+ return m_namedImports.isEmpty() && m_anonymousImports.isEmpty()
+ && m_anonymousCompositeSingletons.isEmpty();
}
QT_END_NAMESPACE