forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -62,6 +62,8 @@ TextEditor::TextStyle toTextStyle(ClangBackEnd::HighlightingType type)
|
||||
case HighlightingType::PreprocessorDefinition:
|
||||
case HighlightingType::PreprocessorExpansion:
|
||||
return TextEditor::C_PREPROCESSOR;
|
||||
case HighlightingType::Punctuation:
|
||||
return TextEditor::C_PUNCTUATION;
|
||||
case HighlightingType::Declaration:
|
||||
return TextEditor::C_DECLARATION;
|
||||
case HighlightingType::FunctionDefinition:
|
||||
|
||||
@@ -235,7 +235,8 @@ int clangColumn(const QTextBlock &line, int cppEditorColumn)
|
||||
ClangBackEnd::StorageClass storageClass = extraInfo.storageClass;
|
||||
if (mainType == ClangBackEnd::HighlightingType::VirtualFunction
|
||||
|| mainType == ClangBackEnd::HighlightingType::Function
|
||||
|| mainType == ClangBackEnd::HighlightingType::Operator) {
|
||||
|| token.types.mixinHighlightingTypes.contains(
|
||||
ClangBackEnd::HighlightingType::Operator)) {
|
||||
if (storageClass != ClangBackEnd::StorageClass::Static) {
|
||||
switch (access) {
|
||||
case ClangBackEnd::AccessSpecifier::Public:
|
||||
|
||||
Reference in New Issue
Block a user