diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-02-07 15:24:30 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2014-12-18 15:46:22 +0100 |
commit | 242b3f4110ebbe3882e28b7df75c26768c5f9ecc (patch) | |
tree | daab9f47f597ab278d97c8e737df68efc54f523f /src/libs/cplusplus/SimpleLexer.h | |
parent | 16becbd29c44e664904a7fb2d698f79fc08b2731 (diff) | |
download | qt-creator-242b3f4110ebbe3882e28b7df75c26768c5f9ecc.tar.gz |
C++: clean up numeric literal parsing and add support for n3472.
Separate the messy pp-number parsing from the numeric literal parsing.
The C/C++ preprocessor makes a grown man cry, but at least we have
"proper" literal parsing when we want it, including C++1y binary
literals.
Next step is digit separators (n3781).
Change-Id: Ia069eef454ed5c056f77694a5b8a595d0b76adc4
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'src/libs/cplusplus/SimpleLexer.h')
-rw-r--r-- | src/libs/cplusplus/SimpleLexer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/cplusplus/SimpleLexer.h b/src/libs/cplusplus/SimpleLexer.h index d4cba997e0..cc3a576928 100644 --- a/src/libs/cplusplus/SimpleLexer.h +++ b/src/libs/cplusplus/SimpleLexer.h @@ -51,6 +51,9 @@ public: bool skipComments() const; void setSkipComments(bool skipComments); + void setPreprocessorMode(bool ppMode) + { _ppMode = ppMode; } + LanguageFeatures languageFeatures() const { return _languageFeatures; } void setLanguageFeatures(LanguageFeatures features) { _languageFeatures = features; } @@ -74,6 +77,7 @@ private: LanguageFeatures _languageFeatures; bool _skipComments: 1; bool _endedJoined: 1; + bool _ppMode: 1; }; } // namespace CPlusPlus |