Skip to content

Commit

Permalink
Few small changes
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
TheLX5 committed Sep 10, 2020
1 parent c61b570 commit b912928
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion asarsyntaxhighlighter/syntaxes/asar.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@
<key>name</key>
<string>label.asar.sublabel.reference</string>
<key>match</key>
<string>(\s*\?*?[\.]+(?!\s*[0-9!%.$<>])[a-zA-Z_0-9][a-zA-Z_0-9]*\s*)(?!(\n|;))</string>
<string>(\s*\?*?[\.]+(?!\s*[!%.$<>])[a-zA-Z_0-9][a-zA-Z_0-9]*\s*)(?!(\n|;))</string>
</dict>


Expand Down
22 changes: 20 additions & 2 deletions asarsyntaxhighlighter/syntaxes/mnemonics.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<key>comment</key>
<string>Bitwise operations</string>
<key>match</key>
<string>(?i)\s*\b(BIT|AND|ORA|EOR|ASL|LSR|ROL|ROR|TRB|TSB)(\.b|\.w|\.l)?\b</string>
<string>(?i)\s*\b(BIT|AND|ORA|EOR|TRB|TSB)(\.b|\.w|\.l)?\b</string>
<key>name</key>
<string>keyword.asar.mnemonics.bitwise</string>
<key>captures</key>
Expand All @@ -173,6 +173,24 @@
</dict>
</dict>

<dict>
<key>comment</key>
<string>Bitwise operations</string>
<key>match</key>
<string>(?i)\s*\b((ASL|LSR|ROL|ROR)(\.b|\.l.|\.w)?(\s+(A))?)\b</string>
<key>name</key>
<string>keyword.asar.mnemonics.bitwise</string>
<key>captures</key>
<dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.asar.mnemonics.length</string>
</dict>
</dict>
</dict>



<dict>
<key>comment</key>
Expand Down Expand Up @@ -203,7 +221,7 @@
<string>keyword.asar.mnemonics.math</string>
<key>captures</key>
<dict>
<key>3</key>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.asar.mnemonics.length</string>
Expand Down

0 comments on commit b912928

Please sign in to comment.