WIP: General improvements to syntax highlighter module
- Use modern
QRegularExpression
objects instead ofQRegExp
[1] - Use C++ raw string literals for representing regular expressions
- Promoted
even_quotes_pattern
regular expression to class member - Use single regular expression rule for Lua keywords matching
- Simplified all other regular expressions (strings and comments)
- Re-order rules application: keywords -> single-line comments -> strings
- Modernise
highlightBlock()
function using recent examples [2] [3] - Use
even_quotes_pattern
for skipping multi-line comments in strings
Tested this myself. Any feedback from veteran Quest Editor users/developers is welcome.
The syntax highlighter is still not 100% perfect but I think is better than before.
Fixes #472
Before:
After:
Edited by Hugo Hromic