summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser/qdeclarativejslexer.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2010-10-26 12:00:43 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2010-10-26 12:00:43 (GMT)
commit85f3f3ac74a2e7fe6a0874a46f9358a15f0dab34 (patch)
tree191b227596f18333f1609ff824d2746dd7f1090f /src/declarative/qml/parser/qdeclarativejslexer.cpp
parent26139fcacc05b4a74fce1ef4e0db819118765310 (diff)
parent2d071521228a6bc9ef423cbdbbd8560d28208790 (diff)
downloadQt-85f3f3ac74a2e7fe6a0874a46f9358a15f0dab34.zip
Qt-85f3f3ac74a2e7fe6a0874a46f9358a15f0dab34.tar.gz
Qt-85f3f3ac74a2e7fe6a0874a46f9358a15f0dab34.tar.bz2
Merge remote branch 'qt/master' into lighthouse-master
Conflicts: src/opengl/qwindowsurface_gl.cpp
Diffstat (limited to 'src/declarative/qml/parser/qdeclarativejslexer.cpp')
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp
index 1eb42e4..52f6210 100644
--- a/src/declarative/qml/parser/qdeclarativejslexer.cpp
+++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp
@@ -510,15 +510,18 @@ int Lexer::lex()
setDone(Eof);
}
} else if (isLineTerminator()) {
- shiftWindowsLineBreak();
- yylineno++;
- yycolumn = 0;
- bol = true;
- terminator = true;
- syncProhibitAutomaticSemicolon();
if (restrKeyword) {
+ // automatic semicolon insertion
+ recordStartPos();
token = QDeclarativeJSGrammar::T_SEMICOLON;
setDone(Other);
+ } else {
+ shiftWindowsLineBreak();
+ yylineno++;
+ yycolumn = 0;
+ bol = true;
+ terminator = true;
+ syncProhibitAutomaticSemicolon();
}
} else if (current == '"' || current == '\'') {
recordStartPos();