16 #ifndef _QNFA_DEFINITION_H_
17 #define _QNFA_DEFINITION_H_
29 #include <QStringList>
45 FormatMask = 0x00000fff,
46 ParenMask = 0x00fff000,
48 Highlight = 0x01000000,
50 ParenOpen = 0x04000000,
51 ParenClose = 0x08000000,
52 MatchParen = 0x10000000,
55 Ambiguous = 0x40000000,
60 inline static int format(
int id)
61 {
return id & FormatMask; }
63 inline static int parenthesis(
int id)
64 {
return id & ParenMask; }
96 static void addContext(
const QString&
id,
QNFA *nfa);
97 static void addEmbedRequest(
const QString& lang,
QNFA *dest);
98 static void shareEmbedRequests(
QNFA *src,
QNFA *dest,
int offset);
106 QStringList m_extensions;
110 QHash<QPointer<QDocument>,
int> m_matchGroups;
112 static QHash<QString, int> m_paren;
113 static QHash<QString, QNFA*> m_contexts;
117 PMatch() : type(Invalid)
144 void matchClose(
QDocument *d, PMatch& m);
146 int findBlockEnd(
QDocument *d,
int line,
bool *open = 0);
148 static void flushEmbedRequests(
const QString& lang);
152 inline EmbedRequest(
QNFA *nfa,
int idx) : index(idx), target(nfa) {}
160 static QHash<QString, EmbedRequestList> m_pendingEmbeds;
163 #endif // !_QNFA_DEFINITION_H_