summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-05-05 15:21:43 (GMT)
committerRoberto Raggi <roberto.raggi@nokia.com>2009-05-05 15:21:43 (GMT)
commitf98a10ed41f181252d83e9cebaa3772d556f6266 (patch)
tree83a696788b4bd5dfbf8cd02085d765ba204d1d71 /src/declarative/qml/parser
parent7495bee56210a99b04f6c5497dc4ef8487fe3362 (diff)
downloadQt-f98a10ed41f181252d83e9cebaa3772d556f6266.zip
Qt-f98a10ed41f181252d83e9cebaa3772d556f6266.tar.gz
Qt-f98a10ed41f181252d83e9cebaa3772d556f6266.tar.bz2
Inserted the semicolon at the end of the previous token.
Diffstat (limited to 'src/declarative/qml/parser')
-rw-r--r--src/declarative/qml/parser/javascript.g5
-rw-r--r--src/declarative/qml/parser/javascriptparser.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g
index 5482392..ec81a7a 100644
--- a/src/declarative/qml/parser/javascript.g
+++ b/src/declarative/qml/parser/javascript.g
@@ -2690,12 +2690,15 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
tk.dval = yylval;
tk.loc = yylloc;
+ yylloc = yyprevlloc;
+ yylloc.offset += yylloc.length;
+ yylloc.startColumn += yylloc.length;
yylloc.length = 0;
const QString msg = QString::fromUtf8("Missing `;'");
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning,
- yyprevlloc.startLine, yyprevlloc.startColumn, msg));
+ yylloc.startLine, yylloc.startColumn, msg));
first_token = &token_buffer[0];
last_token = &token_buffer[1];
diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp
index 185a824..897f0ce 100644
--- a/src/declarative/qml/parser/javascriptparser.cpp
+++ b/src/declarative/qml/parser/javascriptparser.cpp
@@ -1547,12 +1547,15 @@ case 312: {
tk.dval = yylval;
tk.loc = yylloc;
+ yylloc = yyprevlloc;
+ yylloc.offset += yylloc.length;
+ yylloc.startColumn += yylloc.length;
yylloc.length = 0;
const QString msg = QString::fromUtf8("Missing `;'");
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning,
- yyprevlloc.startLine, yyprevlloc.startColumn, msg));
+ yylloc.startLine, yylloc.startColumn, msg));
first_token = &token_buffer[0];
last_token = &token_buffer[1];