move common code to base

This commit is contained in:
Kelvin Sherlock 2013-03-25 22:30:27 -04:00
parent 33f6849373
commit 10585b8c0a
2 changed files with 79 additions and 19 deletions

View File

@ -15,6 +15,37 @@
<string>keyword.mnemonic.65816</string> <string>keyword.mnemonic.65816</string>
</dict> </dict>
</array> </array>
<key>repository</key>
<dict>
<key>binary_number</key>
<dict>
<key>match</key>
<string>%[01]+</string>
<key>name</key>
<string>constant.numeric.binary</string>
</dict>
<key>decimal_number</key>
<dict>
<key>match</key>
<string>\b([0-9]+)\b</string>
<key>name</key>
<string>constant.numeric.decimal</string>
</dict>
<key>hex_number</key>
<dict>
<key>match</key>
<string>\$[A-Za-z0-9]+</string>
<key>name</key>
<string>constant.numeric.hex</string>
</dict>
<key>long_mnemonics</key>
<dict>
<key>match</key>
<string>\b(?i:ADCL|ANDL|CMPL|EORL|LDAL|ORAL|SBCL|STAL)\b</string>
<key>name</key>
<string>keyword.mnemonic.65816.long</string>
</dict>
</dict>
<key>scopeName</key> <key>scopeName</key>
<string>source.asm.65816</string> <string>source.asm.65816</string>
<key>uuid</key> <key>uuid</key>

View File

@ -14,9 +14,25 @@
<key>include</key> <key>include</key>
<string>source.asm.65816</string> <string>source.asm.65816</string>
</dict> </dict>
<dict>
<key>include</key>
<string>source.asm.65816#long_mnemonics</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#hex_number</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#binary_number</string>
</dict>
<dict>
<key>include</key>
<string>source.asm.65816#decimal_number</string>
</dict>
<dict> <dict>
<key>match</key> <key>match</key>
<string>\b(?i:BLT|BGT|BGE)\b</string> <string>\b(?i:BLT|BGE)\b</string>
<key>name</key> <key>name</key>
<string>keyword.mnemonic.65816.alt</string> <string>keyword.mnemonic.65816.alt</string>
</dict> </dict>
@ -71,6 +87,37 @@
</dict> </dict>
</array> </array>
</dict> </dict>
<dict>
<key>begin</key>
<string>\b((?i)HEX)\b</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.directive</string>
</dict>
</dict>
<key>comment</key>
<string>HEX has a list of hex bytes w/o the $</string>
<key>end</key>
<string>$|;</string>
<key>name</key>
<string>meta.hex</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b[0-9A-Fa-f]{1,2}\b</string>
<key>name</key>
<string>constant.numeric.hex</string>
</dict>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
<dict> <dict>
<key>match</key> <key>match</key>
<string>(?&lt;=,)([xXyYsS])\b</string> <string>(?&lt;=,)([xXyYsS])\b</string>
@ -95,24 +142,6 @@
<key>name</key> <key>name</key>
<string>comment.line</string> <string>comment.line</string>
</dict> </dict>
<dict>
<key>match</key>
<string>\$[A-Za-z0-9]+</string>
<key>name</key>
<string>constant.numeric.hex</string>
</dict>
<dict>
<key>match</key>
<string>%[01]+</string>
<key>name</key>
<string>constant.numeric.binary</string>
</dict>
<dict>
<key>match</key>
<string>\b[0-9]+\b</string>
<key>name</key>
<string>constant.numeric.decimal</string>
</dict>
<dict> <dict>
<key>match</key> <key>match</key>
<string>[-+/*^&gt;&lt;|#\[\](),=]</string> <string>[-+/*^&gt;&lt;|#\[\](),=]</string>