38 #ifndef PYSYNTAXHIGHLIGHER_H
39 #define PYSYNTAXHIGHLIGHER_H
41 #include "syntaxHighlighterBase.h"
43 #include <qregularexpression.h>
44 #include <qtextformat.h>
69 typedef QRegularExpression QQRegExp;
71 PythonSyntaxHighlighter(QTextDocument *parent,
const QString &description =
"", QSharedPointer<CodeEditorStyle> editorStyle = QSharedPointer<CodeEditorStyle>());
81 void highlight_block(
const QString &text, QTextBlock &block);
83 void default_highlight_block(
const QString &text,
bool outputNotError);
85 virtual void rehighlight();
91 NamedRegExp(
const QString &groupName_,
const QQRegExp ®Exp_) : regExp(regExp_), groupNames(groupName_) {}
92 NamedRegExp(
const QStringList &groupNames_,
const QQRegExp ®Exp_) : regExp(regExp_), groupNames(groupNames_) {}
94 QStringList groupNames;
98 static QList<NamedRegExp> regExpProg;
99 static QRegExp regExpIdProg;
100 static QRegExp regExpAsProg;
101 static QQRegExp regExpOeComment;
103 QTextCharFormat getFormatFromStyle(StyleItem::StyleType token)
const;
104 const QTextCharFormat getTextCharFormat(
const QString &colorName,
const QString &style = QString());
106 static QList<NamedRegExp> makePythonPatterns(
const QStringList &additionalKeywords = QStringList(),
const QStringList &additionalBuiltins = QStringList());
Definition: syntaxHighlighterBase.h:59
State
< Syntax highlighting states (from one text block to another):
Definition: pythonSyntaxHighlighter.h:60
Definition: apiFunctionsGraph.cpp:39
Definition: pythonSyntaxHighlighter.h:56
Definition: pythonSyntaxHighlighter.h:89