summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser/qdeclarativejsparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/parser/qdeclarativejsparser.cpp')
-rw-r--r--src/declarative/qml/parser/qdeclarativejsparser.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejsparser.cpp b/src/declarative/qml/parser/qdeclarativejsparser.cpp
index 9205ef4..3cf73b1 100644
--- a/src/declarative/qml/parser/qdeclarativejsparser.cpp
+++ b/src/declarative/qml/parser/qdeclarativejsparser.cpp
@@ -273,11 +273,6 @@ case 20: {
node = makeAstNode<AST::UiImport>(driver->nodePool(), importIdLiteral->value);
node->fileNameToken = loc(2);
} else if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(2).Expression)) {
- QString text;
- for (AST::UiQualifiedId *q = qualifiedId; q; q = q->next) {
- text += q->name->asString();
- if (q->next) text += QLatin1String(".");
- }
node = makeAstNode<AST::UiImport>(driver->nodePool(), qualifiedId);
node->fileNameToken = loc(2);
}
@@ -571,6 +566,9 @@ case 76: {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
return false; // ### remove me
}
+
+ loc(1).length = lexer->tokenLength();
+
AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
node->literalToken = loc(1);
sym(1).Node = node;
@@ -582,6 +580,9 @@ case 77: {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
return false;
}
+
+ loc(1).length = lexer->tokenLength();
+
AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
node->literalToken = loc(1);
sym(1).Node = node;