Recompute the token length after the scan of a regexp.
authorRoberto Raggi <roberto.raggi@nokia.com>
Tue, 2 Aug 2011 07:57:01 +0000 (09:57 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 30 Aug 2011 11:18:28 +0000 (13:18 +0200)
Change-Id: I9042f261b374bee1a3f9cb8d2dc40e381a66732b
Reviewed-on: http://codereview.qt.nokia.com/3781
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>

src/declarative/qml/parser/qdeclarativejslexer.cpp

index 6015f38..0d84284 100644 (file)
@@ -854,6 +854,8 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix)
                 _patternFlags |= flag;
                 scanChar();
             }
+
+            _tokenLength = _codePtr - _tokenStartPtr - 1;
             return true;
 
         case '\\':