diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-01-09 03:15:14 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-01-09 03:15:14 (GMT) |
commit | b0cefc0f3b758a73ec7e30677f9f603400d9dc22 (patch) | |
tree | 0dc425695e27457714a00c5600a68dc476b8dd11 /src/highlighter.h | |
parent | a82651de310e4aedf7a634581e6369f528fb649c (diff) |
merge, by hand, Christopher Olah's syntax highlighter code
Diffstat (limited to 'src/highlighter.h')
-rw-r--r-- | src/highlighter.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/highlighter.h b/src/highlighter.h index 2eead6d..a6e2dc3 100644 --- a/src/highlighter.h +++ b/src/highlighter.h @@ -6,7 +6,26 @@ class Highlighter : public QSyntaxHighlighter { public: - Highlighter(QTextDocument *parent); + enum state_e {NORMAL=-1,QUOTE,COMMENT}; + enum mode_e {NORMAL_MODE, ERROR_MODE}; + mode_e mode; + + QStringList operators; + QStringList KeyWords; + QStringList Primitives3D; + QStringList Primitives2D; + QStringList Transforms; + QStringList Imports; + QTextCharFormat ErrorStyle; + QTextCharFormat OperatorStyle; + QTextCharFormat CommentStyle; + QTextCharFormat QuoteStyle; + QTextCharFormat KeyWordStyle; + QTextCharFormat PrimitiveStyle3D; + QTextCharFormat PrimitiveStyle2D; + QTextCharFormat TransformStyle; + QTextCharFormat ImportStyle; + Highlighter(QTextDocument *parent, mode_e mode); void highlightBlock(const QString &text); }; |