|
SILICON
|
#include <codeSyntaxHighlighter.hpp>
Classes | |
| struct | CompiledKeywordGroup |
| struct | CompiledContainedRule |
| struct | CompiledMatchRule |
| struct | CompiledRegionRule |
| struct | RegionEnd |
Public Member Functions | |
| CodeSyntaxHighlighter (QTextDocument *document) | |
| void | setSyntax (const CodeSyntax *syntax) |
| void | setPalette (const QPalette &palette) |
Protected Member Functions | |
| void | highlightBlock (const QString &text) override |
Private Member Functions | |
| const QTextCharFormat & | format (CodeSyntaxStyle style) const |
| void | applyContainedRules (const QString &text, qsizetype start, qsizetype end, const std::vector< CompiledContainedRule > &rules) |
Static Private Member Functions | |
| static RegionEnd | findRegionEnd (const QString &text, qsizetype from, const CompiledRegionRule ®ion) |
Private Attributes | |
| const CodeSyntax * | syntax = nullptr |
| std::vector< CompiledKeywordGroup > | keywordGroups |
| std::vector< CompiledMatchRule > | matchRules |
| std::vector< CompiledRegionRule > | regionRules |
| std::array< QTextCharFormat, STYLE_COUNT > | formats |
Static Private Attributes | |
| static constexpr std::size_t | STYLE_COUNT = 13 |
Applies a UI syntax description to a QTextDocument.
Definition at line 35 of file codeSyntaxHighlighter.hpp.
|
explicit |
Definition at line 53 of file codeSyntaxHighlighter.cpp.
|
private |
Definition at line 181 of file codeSyntaxHighlighter.cpp.
|
staticnodiscardprivate |
Definition at line 159 of file codeSyntaxHighlighter.cpp.
|
nodiscardprivate |
Definition at line 153 of file codeSyntaxHighlighter.cpp.
|
overrideprotected |
Definition at line 198 of file codeSyntaxHighlighter.cpp.
| void setPalette | ( | const QPalette & | palette | ) |
Definition at line 118 of file codeSyntaxHighlighter.cpp.
| void setSyntax | ( | const CodeSyntax * | syntax | ) |
Definition at line 58 of file codeSyntaxHighlighter.cpp.
|
private |
Definition at line 88 of file codeSyntaxHighlighter.hpp.
|
private |
Definition at line 85 of file codeSyntaxHighlighter.hpp.
|
private |
Definition at line 86 of file codeSyntaxHighlighter.hpp.
|
private |
Definition at line 87 of file codeSyntaxHighlighter.hpp.
|
staticconstexprprivate |
Definition at line 76 of file codeSyntaxHighlighter.hpp.
|
private |
Definition at line 84 of file codeSyntaxHighlighter.hpp.