diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-08-22 17:25:12 +0200 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-09-13 11:15:05 +0000 |
commit | 50e5aacb026e79995c9967b12eabb9d37336a841 (patch) | |
tree | 13fec0e3b67bd9197c887ad0a9a61ec520bfc50f /src/libs/3rdparty/cplusplus | |
parent | ccf2d848f4514428bbfe1702e43b20dcb77f58e8 (diff) |
Highlighting: Add highlighting style for punctuation
Currently only operators have their own style but not
punctuation tokens. Make possible to highlight both.
Task-number: QTCREATORBUG-20666
Change-Id: I9533e0f1bef65b86c4e4f5c9756571103584124b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Diffstat (limited to 'src/libs/3rdparty/cplusplus')
-rw-r--r-- | src/libs/3rdparty/cplusplus/Token.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/3rdparty/cplusplus/Token.h b/src/libs/3rdparty/cplusplus/Token.h index 9d30911169..e548b9480a 100644 --- a/src/libs/3rdparty/cplusplus/Token.h +++ b/src/libs/3rdparty/cplusplus/Token.h @@ -332,6 +332,9 @@ public: inline bool isOperator() const { return f.kind >= T_FIRST_OPERATOR && f.kind <= T_LAST_OPERATOR; } + inline bool isPunctuation() const + { return f.kind >= T_FIRST_PUNCTUATION && f.kind <= T_LAST_PUNCTUATION; } + inline bool isPunctuationOrOperator() const { return f.kind >= T_FIRST_PUNCTUATION_OR_OPERATOR && f.kind <= T_LAST_PUNCTUATION_OR_OPERATOR; } |