diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-28 15:34:41 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-28 15:39:58 (GMT) |
commit | fecd70784dfb2ae9159c1ed40840bbb09dd218f0 (patch) | |
tree | 642a0e231fca781b49b0ed59f906638081540cbb /src/3rdparty/webkit/JavaScriptCore/parser/Lexer.cpp | |
parent | 1c72e77e43593dfea6c6392d1058e63762efb534 (diff) | |
download | Qt-fecd70784dfb2ae9159c1ed40840bbb09dd218f0.zip Qt-fecd70784dfb2ae9159c1ed40840bbb09dd218f0.tar.gz Qt-fecd70784dfb2ae9159c1ed40840bbb09dd218f0.tar.bz2 |
Fix tst_QScriptEngine::automaticSemicolonInsertion
Some Semicollon were added at the end of the input while they shouldn't
have.
Let handle the automatic semicolon insertion by the Parser (as it does
already for the normal new lines)
Reviewed-by: Kent Hansen
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/parser/Lexer.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/parser/Lexer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.cpp index 8e89c18..b22832f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.cpp @@ -293,11 +293,15 @@ start: int startOffset = currentOffset(); if (m_current == -1) { +#ifndef QT_BUILD_SCRIPT_LIB /* the parser takes cate about automatic semicolon. + this might add incorrect semicolons */ + //m_delimited and m_isReparsing are now useless if (!m_terminator && !m_delimited && !m_isReparsing) { // automatic semicolon insertion if program incomplete token = ';'; goto doneSemicolon; } +#endif return 0; } |