17 Commits

Author SHA1 Message Date
475c022a2e Prepare 5.0.0 release 2017-03-23 17:28:27 -07:00
35207500a3 Add ARM9 to the contributors list. 2017-03-23 17:27:16 -07:00
716661cf9c Merge pull request #6 from ARM9/master
Add cc65 SNES syntax (65816, spc700, superfx)
2017-03-23 17:26:50 -07:00
4dec149088 Add cc65 SNES grammar, installation instructions
SNES grammar including 65816, spc700 and superfx assembly.
2017-03-23 15:24:11 +01:00
944fefa6b3 Add snes syntax 2017-03-20 20:33:01 +01:00
69e572ec9c Update Contributors
Add Tommy Savaria to the contributors list.
2016-07-20 09:28:28 -07:00
db04e4f13b Prepare 4.0.0 release 2016-07-20 09:25:55 -07:00
80c13409ea Merge pull request #5 from NewLunarFire/master
Add INA Fix Issue #3
2016-07-19 16:48:37 -07:00
13f4c11d05 Added ina to WLA-DX grammar 2016-07-19 18:01:02 -04:00
d98637d01c Revert "Add ina Fix Issue #3"
This reverts commit f1bce28b1d.
2016-07-19 18:00:35 -04:00
f1bce28b1d Add ina Fix Issue #3 2016-07-18 19:22:47 -04:00
77ae562e5e Prepare 3.0.0 release 2016-05-18 14:09:26 -07:00
bba978ab41 Add Contributors to README 2016-05-18 14:08:33 -07:00
c02de139a1 Merge pull request #2 from MattTuttle/master
Fixed label highlighting and added a few things (CA65)
2016-05-18 14:03:06 -07:00
5a713ff273 Improving constant numeric values and fixed label highlighting 2016-05-17 09:43:25 -05:00
0e34ad549b Prepare 2.0.0 release 2015-04-16 09:51:38 -07:00
01dccbb45c Fixes for depreciations. 2015-04-16 09:50:31 -07:00
7 changed files with 147 additions and 259 deletions

View File

@ -19,3 +19,34 @@ from the various other TextMate bundles:
Contributions are greatly appreciated! Please fork this repository and open a Contributions are greatly appreciated! Please fork this repository and open a
pull request to add snippets, make grammar tweaks, etc. 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)
- [Matt Tuttle](https://github.com/MattTuttle)
- [Tommy Savaria](https://github.com/NewLunarFire)
- [ARM9](https://github.com/ARM9)

View File

@ -1,6 +1,6 @@
'fileTypes': [] 'fileTypes': [
'foldingStartMarker': '/\\*\\*|\\{\\s*$' 's'
'foldingStopMarker': '\\*\\*/|^\\s*\\}' ]
'name': '6502 Assembly (cc65)' 'name': '6502 Assembly (cc65)'
'patterns': [ 'patterns': [
{ {
@ -19,11 +19,7 @@
'include': '#M65816_alias' 'include': '#M65816_alias'
} }
{ {
'begin': '(;)' 'match': ';.*$'
'beginCaptures':
'1':
'name': 'punctuation.definition.comment'
'end': '\\n'
'name': 'comment.line.semicolon' 'name': 'comment.line.semicolon'
} }
{ {
@ -37,6 +33,10 @@
'name': 'punctuation.definition.string.end' 'name': 'punctuation.definition.string.end'
'name': 'string.quoted.double.assembly' 'name': 'string.quoted.double.assembly'
} }
{
'match': '\\#(\'.\'|[^\\s\']+)'
'name': 'constant.numeric.hex'
}
{ {
'match': '\\$[A-Fa-f0-9]+' 'match': '\\$[A-Fa-f0-9]+'
'name': 'constant.numeric.hex' 'name': 'constant.numeric.hex'
@ -54,7 +54,7 @@
'name': 'constant.numeric.decimal' 'name': 'constant.numeric.decimal'
} }
{ {
'match': '^[A-Za-z_][A-Za-z0-9_]:*' 'match': '^[A-Za-z_][A-Za-z0-9_]*:'
'name': 'variable.other.readwrite.assembly' # 'entity.name.label' 'name': 'variable.other.readwrite.assembly' # 'entity.name.label'
} }
{ {

View File

@ -1,248 +0,0 @@
'fileTypes': [
'clj'
'cljs'
'clojure'
'edn'
]
'foldingStartMarker': '\\(\\s*$'
'foldingStopMarker': '^\\s*\\)'
'name': 'Clojure'
'patterns': [
{
'include': '#comment'
}
{
'include': '#shebang-comment'
}
{
'include': '#quoted-sexp'
}
{
'include': '#sexp'
}
{
'include': '#keyfn'
}
{
'include': '#string'
}
{
'include': '#vector'
}
{
'include': '#set'
}
{
'include': '#map'
}
{
'include': '#regexp'
}
{
'include': '#var'
}
{
'include': '#constants'
}
{
'include': '#symbol'
}
{
'include': '#whitespace'
}
]
'repository':
'comment':
'captures':
'1':
'name': 'punctuation.definition.comment.clojure'
'match': '(;).*$\\n?'
'name': 'comment.line.semicolon.clojure'
'constants':
'patterns': [
{
'match': '(nil)(?=(\\s|\\)|\\]|\\}))'
'name': 'constant.language.nil.clojure'
}
{
'match': '(true|false)'
'name': 'constant.language.boolean.clojure'
}
{
'match': '(\\d+/\\d+)'
'name': 'constant.numeric.ratio.clojure'
}
{
'match': '(\\d+r\\d+)'
'name': 'constant.numeric.arbitrary-radix.clojure'
}
{
'match': '(0x\\d+)'
'name': 'constant.numeric.hexidecimal.clojure'
}
{
'match': '(0\\d+)'
'name': 'constant.numeric.octal.clojure'
}
{
'match': '(\\d+)'
'name': 'constant.numeric.decimal.clojure'
}
{
'match': '(?<=(\\s|\\(|\\[|\\{)):[a-zA-Z0-9\\#\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}))'
'name': 'constant.keyword.clojure'
}
]
'keyfn':
'patterns': [
{
'match': '(?<=(\\s|\\(|\\[|\\{))(if(-[-a-z\\?]*)?|when(-[-a-z]*)?|for(-[-a-z]*)?|cond|do|let(-[-a-z\\?]*)?|binding|loop|recur|fn|throw[a-z\\-]*|try|catch|finally|([a-z]*case))(?=(\\s|\\)|\\]|\\}))'
'name': 'storage.control.clojure'
}
{
'match': '(?<=(\\s|\\(|\\[|\\{))(declare-?|(in-)?ns|import|use|require|load|compile|(def[a-z\\-]*))(?=(\\s|\\)|\\]|\\}))'
'name': 'keyword.control.clojure'
}
]
'map':
'begin': '(\\{)'
'end': '(\\})'
'name': 'meta.map.clojure'
'patterns': [
{
'include': '$self'
}
]
'quoted-sexp':
'begin': '([\'``]\\()'
'beginCaptures':
'1':
'name': 'punctuation.section.expression.begin.clojure'
'end': '(\\))(\\n)?'
'endCaptures':
'1':
'name': 'punctuation.section.expression.end.clojure'
'2':
'name': 'meta.after-expression.clojure'
'name': 'meta.quoted-expression.clojure'
'patterns': [
{
'include': '$self'
}
]
'regexp':
'begin': '#\\"'
'end': '\\"'
'name': 'string.regexp.clojure'
'patterns': [
{
'include': '#regexp_escaped_char'
}
]
'regexp_escaped_char':
'match': '\\\\(\\")'
'name': 'string.regexp.clojure'
'set':
'begin': '(\\#\\{)'
'end': '(\\})'
'name': 'meta.set.clojure'
'patterns': [
{
'include': '$self'
}
]
'sexp':
'begin': '(\\()'
'beginCaptures':
'1':
'name': 'punctuation.section.expression.begin.clojure'
'end': '(\\))(\\n)?'
'endCaptures':
'1':
'name': 'punctuation.section.expression.end.clojure'
'2':
'name': 'meta.after-expression.clojure'
'name': 'meta.expression.clojure'
'patterns': [
{
'begin': '(?<=\\()(ns|def|def-|defn|defn-|defvar|defvar-|defmacro|defmacro-|deftest)\\s+(.+?)(?=\\s)'
'beginCaptures':
'1':
'name': 'keyword.control.clojure'
'2':
'name': 'entity.global.clojure'
'end': '(?=\\))'
'name': 'meta.definition.global.clojure'
'patterns': [
{
'include': '$self'
}
]
}
{
'include': '$self'
}
]
'shebang-comment':
'captures':
'1':
'name': 'punctuation.definition.comment.shebang.clojure'
'match': '^(\\#!).*$\\n?'
'name': 'comment.line.semicolon.clojure'
'string':
'begin': '(")'
'beginCaptures':
'1':
'name': 'punctuation.definition.string.begin.clojure'
'end': '(")'
'endCaptures':
'1':
'name': 'punctuation.definition.string.end.clojure'
'name': 'string.quoted.double.clojure'
'patterns': [
{
'match': '\\\\.'
'name': 'constant.character.escape.clojure'
}
]
'symbol':
'patterns': [
{
'match': '(\\w[\\w\\d]+)'
'name': 'meta.symbol.clojure'
}
]
'var':
'match': '(?<=(\\s|\\(|\\[|\\{)\\#)\'[a-zA-Z0-9\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}))'
'name': 'meta.var.clojure'
'vector':
'begin': '(\\[)'
'end': '(\\])'
'name': 'meta.vector.clojure'
'patterns': [
{
'include': '$self'
}
]
'whitespace':
'match': '\\s+$'
'name': 'invalid.trailing-whitespace'
'scopeName': 'source.clojure'
'smartTypingPairs': [
[
'"'
'"'
]
[
'('
')'
]
[
'{'
'}'
]
[
'['
']'
]
]

View File

@ -0,0 +1,105 @@
'fileTypes': []
'name': 'SNES Assembly (cc65)'
'patterns': [
{
'include': '#M6502'
}
{
'include': '#M65C02'
}
{
'include': '#M65816'
}
{
'include': '#M65816_alias'
}
{
'include': '#MSuperFX'
}
{
'include': '#MSPC700'
}
{
'match': ';.*$'
'name': 'comment.line.semicolon'
}
{
'match': '\\b(?i:R0|R1|R2|R3|R4|R5|R6|R7|R8|R9|R10|R11|R12|R13|R14|R15|SP|LR|PC)\\b'
'name': 'support.function.pseudo'
}
{
'begin': '"'
'beginCaptures':
'1':
'name': 'punctuation.definition.string.begin'
'end': '"'
'endCaptures':
'1':
'name': 'punctuation.definition.string.end'
'name': 'string.quoted.double.assembly'
}
{
'match': '\\$[A-Fa-f0-9]+'
'name': 'constant.numeric.hex'
}
{
'match': '\\b[0-9][0-9a-fA-f]*h\\b'
'name': 'constant.numeric.hex'
}
{
'match': '%[01]+'
'name': 'constant.numeric.binary'
}
{
'match': '\\b[0-9]+\\b'
'name': 'constant.numeric.decimal'
}
{
'match': '\\b[A-Za-z_][A-Za-z0-9_]*\\b'
'name': 'variable.other.readwrite.assembly' # 'entity.name.label'
}
{
'match': '@[A-Za-z_][A-Za-z0-9_]*\\b'
'name': 'variable.other.readwrite.instance.assembly' # 'entity.name.label.local'
}
{
'match': '(\\.)?\\b(?i:bank|bankbyte|blank|concat|const|hibyte|hiword|ident|left|lobyte|loword|match|max|mid|min|ref|referenced|right|sizeof|sprintf|strat|string|strlen|tcount|xmatch)\\b'
'name': 'support.function.pseudo' # http://oliverschmidt.github.io/cc65/doc/ca65.html#toc10
}
{
'match': '(\\.)?\\b(?i:a16|a8|addr|align|asciiz|assert|autoimport|bankbytes|bss|byt|byte|case|charmap|code|condes|constructor|data|dbyt|debuginfo|def|define|defined|delmac|delmacro|destructor|dword|else|elseif|end|endenum|endif|endmac|endmacro|endproc|endrep|endrepeat|endscope|endstruct|endunion|enum|error|exitmac|exitmacro|export|exportzp|faraddr|fatal|feature|fileopt|fopt|forceimport|global|globalzp|hibytes|i16|i8|if|ifblank|ifconst|ifdef|ifnblank|ifndef|ifnref|ifp02|ifp816|ifpc02|ifpsc02|ifref|import|importzp|incbin|include|interruptor|linecont|list|listbytes|lobytes|local|localchar|mac|macpack|macro|org|out|p02|p816|pagelen|pagelength|pc02|popcpu|popseg|proc|psc02|pushcpu|pushseg|reloc|repeat|res|rodata|scope|segment|set|setcpu|smart|struct|tag|undef|undefine|union|warning|word|zeropage)\\b'
'name': 'storage.modifier' # http://oliverschmidt.github.io/cc65/doc/ca65.html#toc11
}
{
'match': '\\b(CPU_6502|CPU_65SC02|CPU_65C02|CPU_65816|CPU_SWEET16|CPU_HUC6280|CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02|CPU_ISET_65816|CPU_ISET_SWEET16|CPU_ISET_HUC6280|__APPLE2__|__APPLE2ENH__|__ATARI__|__ATARIXL__|__ATMOS__|__BBC__|__C128__|__C16__|__C64__|__CBM__|__CBM510__|__CBM610__|__GEOS__|__GEOS_APPLE__|__GEOS_CBM__|__LUNIX__|__LYNX__|__NES__|__PET__|__PLUS4__|__SIM6502__|__SIM65C02__|__SUPERVISION__|__VIC20__)\\b'
'name': 'constant.language.assembly.cc65'
}
{
'match': '!|&|&&|\\^|\\*|\\/|\\-|\\+|~|=|<=|>=|<<|>>|<>|<|>|\\||\\|\\|'
'name': 'keyword.operator.assembly.cc65' # http://oliverschmidt.github.io/cc65/doc/ca65.html#toc5.5
}
{
'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
}
]
'repository':
'M6502':
'match': '\\b(?i:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA)\\b'
'name': 'keyword.mnemonic.6502'
'M65816':
'match': '\\b(?i:BRL|COP|JML|JSL|MVN|MVP|PEA|PEI|PER|PHB|PHD|PHK|PLB|PLD|REP|RTL|SEP|TCD|TCS|TDC|TSC|TXY|TYX|WDM|XBA|XCE)\\b'
'name': 'keyword.mnemonic.65816'
'M65816_alias':
'match': '\\b(?i:BGE|BLT|CPA|DEA|INA|SWA|TAD|TAS|TDA|TSA)\\b'
'name': 'keyword.mnemonic.65816_alias'
'M65C02':
'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|LDW|LEA|LINK|LJMP|LM|LMS|LMULT|LOB|LOOP|LSR|MERGE|MOVE|MOVEB|MOVES|MOVEW|MULT|NOP|NOT|OR|PLOT|POP|PUSH|RAMB|RET|ROL|ROMB|ROR|RPIX|SBC|SBK|SEX|SM|SMS|STB|STOP|STW|SUB|SWAP|TO|UMULT|WITH|XOR)\\b'
'name': 'keyword.mnemonic.superfx'
'MSPC700':
'match': '\\b(?i:ADC|ADDW|AND|AND1|ASL|BBC|BBS|BCC|BCS|BEQ|BMI|BNE|BPL|BVC|BVS|BRA|BRK|CALL|CBNE|CLR1|CLRC|CLRP|CLRV|CMP|CMPW|DAA|DAS|DBNZ|DEC|DECW|DI|DIV|EI|EOR|EOR1|INC|INCW|JMP|LSR|MOV|MOV1|MOVW|MUL|NOP|NOT1|NOTC|OR|OR1|PCALL|POP|PUSH|RET|RETI|ROL|ROR|SBC|SET1|SETC|SETP|SLEEP|STOP|SUBW|TCALL|TCLR1|TSET1|XCN)\\b'
'name': 'keyword.mnemonic.spc700'
'scopeName': 'source.assembly.snes.cc65'

View File

@ -75,7 +75,7 @@
] ]
'repository': 'repository':
'M6502': 'M6502':
'match': '\\b(?i:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA)\\b' 'match': '\\b(?i:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INA|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA)\\b'
'name': 'keyword.mnemonic.6502' 'name': 'keyword.mnemonic.6502'
'M65816': 'M65816':
'match': '\\b(?i:BRL|COP|JML|JSL|MVN|MVP|PEA|PEI|PER|PHB|PHD|PHK|PLB|PLD|REP|RTL|SEP|TCD|TCS|TDC|TSC|TXY|TYX|WDM|XBA|XCE)\\b' 'match': '\\b(?i:BRL|COP|JML|JSL|MVN|MVP|PEA|PEI|PER|PHB|PHD|PHK|PLB|PLD|REP|RTL|SEP|TCD|TCS|TDC|TSC|TXY|TYX|WDM|XBA|XCE)\\b'

2
package.json Executable file → Normal file
View File

@ -1,6 +1,6 @@
{ {
"name": "language-65asm", "name": "language-65asm",
"version": "0.1.0", "version": "5.0.0",
"description": "Adds syntax highlighting to 65816/65C816/65802/6502/65C02 files in Atom, with extra support for various compilers.", "description": "Adds syntax highlighting to 65816/65C816/65802/6502/65C02 files in Atom, with extra support for various compilers.",
"repository": "https://github.com/MatthewCallis/language-65asm", "repository": "https://github.com/MatthewCallis/language-65asm",
"license": "MIT", "license": "MIT",