qt: fix asm instructions highlighting (#4745)

* qt: fix asm instructions highlighting
This commit is contained in:
scribam 2018-06-12 16:38:19 +02:00 committed by Ani
parent 88b6d51643
commit cc22d25490

View File

@ -55,13 +55,13 @@ void Highlighter::highlightBlock(const QString &text)
AsmHighlighter::AsmHighlighter(QTextDocument *parent) : Highlighter(parent)
{
addRule("^([^\\s]+).*$", Qt::darkBlue); // Instructions
addRule(",?\\s(-?R\\d[^,;\\s]*)", Qt::darkRed); // -R0.*
addRule(",?\\s(-?H\\d[^,;\\s]*)", Qt::red); // -H1.*
addRule(",?\\s(-?v\\[\\d\\]*[^,;\\s]*)", Qt::darkCyan); // -v[xyz].*
addRule(",?\\s(-?o\\[\\d\\]*[^,;\\s]*)", Qt::darkMagenta); // -o[xyz].*
addRule(",?\\s(-?c\\[\\d\\]*[^,;\\s]*)", Qt::darkYellow); // -c[xyz].*
addRule("#[^\\n]*", Qt::darkGreen); // Single line comment
addRule("^[A-Z0-9]+", Qt::darkBlue); // Instructions
addRule("-?R\\d[^,;\\s]*", Qt::darkRed); // -R0.*
addRule("-?H\\d[^,;\\s]*", Qt::red); // -H1.*
addRule("-?v\\[\\d\\]*[^,;\\s]*", Qt::darkCyan); // -v[xyz].*
addRule("-?o\\[\\d\\]*[^,;\\s]*", Qt::darkMagenta); // -o[xyz].*
addRule("-?c\\[\\d\\]*[^,;\\s]*", Qt::darkYellow); // -c[xyz].*
addRule("#[^\\n]*", Qt::darkGreen); // Single line comment
}
GlslHighlighter::GlslHighlighter(QTextDocument *parent) : Highlighter(parent)