aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/Lexer.cpp
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@nokia.com>2012-02-03 11:46:13 +0100
committerLeandro Melo <leandro.melo@nokia.com>2012-02-03 11:52:01 +0100
commit6d85b53f9c8364bb034bcdcfd5d017b0b6ca99c3 (patch)
treeb225d9794809ef8dbb951f63f0ac1e70227f6f3b /src/libs/3rdparty/cplusplus/Lexer.cpp
parentb4eec17317768588196fb715c38356b7811e52d4 (diff)
Revert "Editor: Highlight background for whitespaces in strings and comments"
The change brokes the Lexer. This reverts commit e46a5579d368162034813cc4b27d8d5c9f0716d9. Change-Id: I3363c6eff74b53a7f2d9f417941cde07aaa92619 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Lexer.cpp')
-rw-r--r--src/libs/3rdparty/cplusplus/Lexer.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/libs/3rdparty/cplusplus/Lexer.cpp b/src/libs/3rdparty/cplusplus/Lexer.cpp
index 1cac04e883..a44e22650e 100644
--- a/src/libs/3rdparty/cplusplus/Lexer.cpp
+++ b/src/libs/3rdparty/cplusplus/Lexer.cpp
@@ -157,15 +157,10 @@ void Lexer::scan(Token *tok)
void Lexer::scan_helper(Token *tok)
{
_Lagain:
- _tokenStart = _currentChar;
- tok->offset = _currentChar - _firstChar;
-
while (_yychar && std::isspace(_yychar)) {
if (_yychar == '\n') {
tok->f.joined = false;
tok->f.newline = true;
- if (_state == State_MultiLineComment || _state == State_MultiLineDoxyComment)
- break;
} else {
tok->f.whitespace = true;
}
@@ -175,10 +170,12 @@ void Lexer::scan_helper(Token *tok)
if (! _translationUnit)
tok->lineno = _currentLine;
+ _tokenStart = _currentChar;
+ tok->offset = _currentChar - _firstChar;
+
if (_state == State_MultiLineComment || _state == State_MultiLineDoxyComment) {
const int originalState = _state;
-
if (! _yychar) {
tok->f.kind = T_EOF_SYMBOL;
return;
@@ -207,9 +204,6 @@ void Lexer::scan_helper(Token *tok)
return; // done
}
- _tokenStart = _currentChar;
- tok->offset = _currentChar - _firstChar;
-
if (! _yychar) {
tok->f.kind = T_EOF_SYMBOL;
return;