forked from qt-creator/qt-creator
C++: Fix support for incremental input with \n
Also fix false positive line continuation on blank line e.g. "foo \ bar" Change-Id: Ic6d345a4b578c955411d119b8438c8dc5065c072 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
fd31b4716c
commit
e600424648
10
src/libs/3rdparty/cplusplus/Lexer.h
vendored
10
src/libs/3rdparty/cplusplus/Lexer.h
vendored
@@ -99,6 +99,11 @@ private:
|
||||
unsigned _scanAngleStringLiteralTokens: 1;
|
||||
};
|
||||
|
||||
struct State {
|
||||
unsigned char _tokenKind : 7;
|
||||
unsigned char _newlineExpected : 1;
|
||||
};
|
||||
|
||||
TranslationUnit *_translationUnit;
|
||||
Control *_control;
|
||||
const char *_firstChar;
|
||||
@@ -106,7 +111,10 @@ private:
|
||||
const char *_lastChar;
|
||||
const char *_tokenStart;
|
||||
unsigned char _yychar;
|
||||
int _state;
|
||||
union {
|
||||
unsigned char _state;
|
||||
State s;
|
||||
};
|
||||
union {
|
||||
unsigned _flags;
|
||||
Flags f;
|
||||
|
||||
Reference in New Issue
Block a user