From b912928f34fee06fd95d48977a49c8fae5151c87 Mon Sep 17 00:00:00 2001 From: TheLX5 Date: Thu, 10 Sep 2020 08:33:57 -0700 Subject: [PATCH] Few small changes * Fixed sublabel references not highlighting to sublabels starting with numbers * Fixed ADC and SBC lengths not being colored with the proper scope * Made ASL, LSR, ROL and ROR coloring the letter A if it's alone --- .../syntaxes/asar.tmLanguage | 2 +- .../syntaxes/mnemonics.tmLanguage | 22 +++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/asarsyntaxhighlighter/syntaxes/asar.tmLanguage b/asarsyntaxhighlighter/syntaxes/asar.tmLanguage index 2831baa..b421f38 100644 --- a/asarsyntaxhighlighter/syntaxes/asar.tmLanguage +++ b/asarsyntaxhighlighter/syntaxes/asar.tmLanguage @@ -703,7 +703,7 @@ name label.asar.sublabel.reference match - (\s*\?*?[\.]+(?!\s*[0-9!%.$<>])[a-zA-Z_0-9][a-zA-Z_0-9]*\s*)(?!(\n|;)) + (\s*\?*?[\.]+(?!\s*[!%.$<>])[a-zA-Z_0-9][a-zA-Z_0-9]*\s*)(?!(\n|;)) diff --git a/asarsyntaxhighlighter/syntaxes/mnemonics.tmLanguage b/asarsyntaxhighlighter/syntaxes/mnemonics.tmLanguage index 2712e3d..0613459 100644 --- a/asarsyntaxhighlighter/syntaxes/mnemonics.tmLanguage +++ b/asarsyntaxhighlighter/syntaxes/mnemonics.tmLanguage @@ -160,7 +160,7 @@ comment Bitwise operations match - (?i)\s*\b(BIT|AND|ORA|EOR|ASL|LSR|ROL|ROR|TRB|TSB)(\.b|\.w|\.l)?\b + (?i)\s*\b(BIT|AND|ORA|EOR|TRB|TSB)(\.b|\.w|\.l)?\b name keyword.asar.mnemonics.bitwise captures @@ -173,6 +173,24 @@ + + comment + Bitwise operations + match + (?i)\s*\b((ASL|LSR|ROL|ROR)(\.b|\.l.|\.w)?(\s+(A))?)\b + name + keyword.asar.mnemonics.bitwise + captures + + 3 + + name + keyword.asar.mnemonics.length + + + + + comment @@ -203,7 +221,7 @@ keyword.asar.mnemonics.math captures - 3 + 2 name keyword.asar.mnemonics.length