From cc22d25490c6cda089d83f4a843b28aed83b2914 Mon Sep 17 00:00:00 2001 From: scribam Date: Tue, 12 Jun 2018 16:38:19 +0200 Subject: [PATCH] qt: fix asm instructions highlighting (#4745) * qt: fix asm instructions highlighting --- rpcs3/rpcs3qt/syntax_highlighter.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rpcs3/rpcs3qt/syntax_highlighter.cpp b/rpcs3/rpcs3qt/syntax_highlighter.cpp index e3e0d91fee..d12bf99cfe 100644 --- a/rpcs3/rpcs3qt/syntax_highlighter.cpp +++ b/rpcs3/rpcs3qt/syntax_highlighter.cpp @@ -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)