Add cc65 SNES grammar, installation instructions

SNES grammar including 65816, spc700 and superfx assembly.
This commit is contained in:
ARM9 2017-03-23 15:24:11 +01:00
parent 944fefa6b3
commit 4dec149088
2 changed files with 27 additions and 6 deletions

View File

@ -20,6 +20,30 @@ from the various other TextMate bundles:
Contributions are greatly appreciated! Please fork this repository and open a
pull request to add snippets, make grammar tweaks, etc.
# Installation
In atom, press `ctrl+shift+p` and enter `install package`, then type `language-65asm` into the search bar and hit install.
#### OR
Run `apm install language-65asm` in a terminal.
To add automatic syntax highlighting to a set of file extensions, add this to your
config.cson (`ctrl+shift+p` -> config):
```
"*":
core:
customFileTypes: {
"source.assembly.6502.cc65": [
"asm"
"inc"
]
}
```
See last line in grammar files for names.
# Contributors
- [Matthew Callis](https://github.com/MatthewCallis)

View File

@ -1,7 +1,4 @@
'fileTypes': [
'asm',
'inc'
]
'fileTypes': []
'name': 'SNES Assembly (cc65)'
'patterns': [
{
@ -82,7 +79,7 @@
'name': 'keyword.operator.assembly.cc65' # http://oliverschmidt.github.io/cc65/doc/ca65.html#toc5.5
}
{
'match': '(\\.)\\b(?i:and|bankbyte|bitand|bitnot|bitor|bitxor|hibyte|lobyte|mod|not|or|shl|shr|xor)\\b'
'match': '(\\.)\\b(?i:and|bankbyte|bitand|bitnot|bitor|bitxor|mod|not|or|shl|shr|xor)\\b'
'name': 'keyword.operator.assembly.cc65' # http://oliverschmidt.github.io/cc65/doc/ca65.html#toc5.5
}
]
@ -100,7 +97,7 @@
'match': '\\b(?i:BRA|PHX|PHY|PLX|PLY|STP|STZ|TRB|TSB|WAI)\\b'
'name': 'keyword.mnemonic.65c02'
'MSuperFX':
'match': '\\b(?i:ADD|ADC|ALT1|ALT2|ALT3|AND|ASR|BCC|BCS|BEQ|BGE|BIC|BLT|BMI|BNE|BPL|BRA|BVC|BVS|CACHE|CMODE|CMP|COLOR|DEC|DIV2|FMULT|FROM|GETB|GETBH|GETBL|GETBS|GETC|HIB|IBT|INC|IWT|JAL|JMP|LDB|L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