File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
- #ifndef SYNTAX_H
2
- #define SYNTAX_H
1
+ #pragma once
3
2
4
3
#include < QTextCharFormat>
5
4
#include < QRegularExpression>
@@ -22,16 +21,23 @@ class Syntax : public QSyntaxHighlighter
22
21
QRegularExpression pattern;
23
22
QTextCharFormat format;
24
23
};
25
- QList <SyntaxRule> syntaxRules;
24
+ QVector <SyntaxRule> syntaxRules;
26
25
27
26
QTextCharFormat keywordFormat;
28
27
QTextCharFormat singleLineCommentFormat;
29
28
QTextCharFormat quotationMark;
30
29
QTextCharFormat functionFormat;
31
30
QTextCharFormat parenthesisFormat;
32
31
QTextCharFormat charFormat;
32
+ QTextCharFormat iterationFormat;
33
33
34
34
void addPattern (const QString &pattern, const QTextCharFormat &format);
35
- };
36
35
37
- #endif // SYNTAX_H
36
+ // Initialization functions for different syntax highlighting rules
37
+ void initKeywordRules ();
38
+ void initCommentRules ();
39
+ void initFunctionRules ();
40
+ void initParenthesisRules ();
41
+ void initCharRules ();
42
+ void initQuotationRules ();
43
+ };
You can’t perform that action at this time.
0 commit comments