| 427 | } |
| 428 | |
| 429 | BlockRule *LuaHighlighter::nextBlockRule(const QString& text, int *pos, int *next) |
| 430 | { |
| 431 | BlockRule *rule = nullptr; |
| 432 | int min = INT_MAX; |
| 433 | int end = 0; |
| 434 | for (int i = 0, n = blockrules.size(); i < n; i++) |
| 435 | { |
| 436 | QRegularExpressionMatch m = blockrules[i].start.match(text, *pos); |
| 437 | if (m.hasMatch() && m.capturedStart() < min) |
| 438 | { |
| 439 | rule = &blockrules[i]; |
| 440 | min = m.capturedStart(); |
| 441 | end = m.capturedEnd(); |
| 442 | } |
| 443 | } |
| 444 | if (rule) |
| 445 | { |
| 446 | *pos = min; |
| 447 | *next = end; |
| 448 | } |
| 449 | return rule; |
| 450 | } |
| 451 | |
| 452 | void LuaHighlighter::highlightBlock(const QString& text) |
| 453 | { |
nothing calls this directly
no outgoing calls
no test coverage detected