Changeset View
Changeset View
Standalone View
Standalone View
src/backends/python/pythonhighlighter.cpp
Show All 38 Lines | |||||
39 | { | 39 | { | ||
40 | if (skipHighlighting(text)) { | 40 | if (skipHighlighting(text)) { | ||
41 | return; | 41 | return; | ||
42 | } | 42 | } | ||
43 | 43 | | |||
44 | // Do some backend independent highlighting (brackets etc.) | 44 | // Do some backend independent highlighting (brackets etc.) | ||
45 | DefaultHighlighter::highlightBlock(text); | 45 | DefaultHighlighter::highlightBlock(text); | ||
46 | 46 | | |||
47 | // TODO: Remove, if Python starts support partial highlighting | ||||
48 | if (isPartialHighlighting()) | ||||
49 | return; | ||||
50 | | ||||
47 | const int IN_MULTILINE_COMMENT = 1; | 51 | const int IN_MULTILINE_COMMENT = 1; | ||
48 | const int IN_SMALL_QUOTE_STRING = 2; | 52 | const int IN_SMALL_QUOTE_STRING = 2; | ||
49 | const int IN_SINGLE_QUOTE_STRING = 4; | 53 | const int IN_SINGLE_QUOTE_STRING = 4; | ||
50 | const int IN_TRIPLE_QUOTE_STRING = 8; | 54 | const int IN_TRIPLE_QUOTE_STRING = 8; | ||
51 | 55 | | |||
52 | QRegExp multiLineCommentStartEnd(QLatin1String("'''")); | 56 | QRegExp multiLineCommentStartEnd(QLatin1String("'''")); | ||
53 | QRegExp smallQuoteStartEnd(QLatin1String("'")); | 57 | QRegExp smallQuoteStartEnd(QLatin1String("'")); | ||
54 | QRegExp singleQuoteStringStartEnd(QLatin1String("\"")); | 58 | QRegExp singleQuoteStringStartEnd(QLatin1String("\"")); | ||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |