diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2011-12-05 14:42:09 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-05 15:35:36 +0100 |
commit | 4bc66eb9389974ca1dda2595414175e69af418bc (patch) | |
tree | 8ab6d89b9291fee83ffe122656fefd4c2cf1516a /src/declarative/qml/parser/qdeclarativejsparser.cpp | |
parent | 97cbef99cbd35b22a17bf29ed406b20d4d35680c (diff) |
Adjust the source location of the last accepted token.
This is necessary to get automatic semicolons inserted at the correct
location.
Change-Id: Ie3f806ed20704310cd6155f2dac6d0388a4a9f78
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src/declarative/qml/parser/qdeclarativejsparser.cpp')
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsparser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejsparser.cpp b/src/declarative/qml/parser/qdeclarativejsparser.cpp index b1384d369f..4db8a104f2 100644 --- a/src/declarative/qml/parser/qdeclarativejsparser.cpp +++ b/src/declarative/qml/parser/qdeclarativejsparser.cpp @@ -577,6 +577,7 @@ case 79: { } loc(1).length = lexer->tokenLength(); + yylloc = loc(1); // adjust the location of the current token AST::RegExpLiteral *node = new (pool) AST::RegExpLiteral( driver->newStringRef(lexer->regExpPattern()), lexer->regExpFlags()); @@ -592,6 +593,7 @@ case 80: { } loc(1).length = lexer->tokenLength(); + yylloc = loc(1); // adjust the location of the current token AST::RegExpLiteral *node = new (pool) AST::RegExpLiteral( driver->newStringRef(lexer->regExpPattern()), lexer->regExpFlags()); |