6502asm-sublime/6502asm.JSON-tmLanguage

76 lines
2.0 KiB
Plaintext
Raw Normal View History

2013-10-10 16:39:52 +00:00
{
"name": "6502 asm",
"scopeName": "source.asm",
"fileTypes": ["asm"],
"patterns": [
{
"match": "(?i)\\b(adc|and|asl|dec|dex|dey|eor|inc|inx|iny|lsr|ora|rol|ror|sbc)\\b",
2013-10-10 20:01:54 +00:00
"name": "keyword.arithlogic.asm",
2013-10-10 16:39:52 +00:00
"comment": "Arithmetic and logic instruction mnemonics"
},
{
"match": "(?i)\\b(bcc|bcs|beq|bmi|bne|bpl|bvc|bvs|jmp|jsr|rti|rts)\\b",
2013-10-10 20:01:54 +00:00
"name": "keyword.branch.asm",
2013-10-10 16:39:52 +00:00
"comment": "Branch instruction mnemonics"
},
{
"match": "(?i)\\b(bit|cmp|cpx|cpy)\\b",
2013-10-10 20:01:54 +00:00
"name": "keyword.compare.asm",
2013-10-10 16:39:52 +00:00
"comment": "Comparison instructions"
},
{
"match": "(?i)\\b(clc|cld|cli|clv|sec|sed|sei)\\b",
2013-10-10 20:01:54 +00:00
"name": "keyword.flagset.asm",
2013-10-10 16:39:52 +00:00
"comment": "Flag setting instructions"
},
{
"match": "(?i)\\b(lda|ldx|ldy|pha|php|pla|plp|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\\b",
2013-10-10 20:01:54 +00:00
"name": "keyword.transfer.asm",
2013-10-10 16:39:52 +00:00
"comment": "Load, store, and transfer instructions"
},
{
"match": "(\/\/|;)(\\s|\\S)*",
"name": "comment.line.asm",
"comment": "Comment line"
},
{
"match": "(^|\\s)\"[\\w\\s\\W]*\"($|\\s)",
"name": "string.asm",
"comment": "Single-line string"
},
{
"match": "(^|\\s)\\'[\\w\\s\\W]*\\'($|\\s)",
"name": "string.asm",
"comment": "Single-line string"
},
{
2013-10-10 19:58:26 +00:00
"match": "(?i)\\$((\\d|[A-F])+)\\b",
2013-10-10 16:39:52 +00:00
"name": "constant.numeric.asm",
"comment": "Hex number constant"
},
{
2013-10-10 20:03:25 +00:00
"match": "(?i)\\%([0|1]+)\\b",
2013-10-10 16:39:52 +00:00
"name": "constant.numeric.asm",
2013-10-10 20:01:54 +00:00
"comment": "Binary number constant"
2013-10-10 16:39:52 +00:00
},
{
2013-10-10 20:01:54 +00:00
"match": "(?i)\\#([0-9]+)\\b",
2013-10-10 16:39:52 +00:00
"name": "constant.numeric.asm",
2013-10-10 20:01:54 +00:00
"comment": "Decimal number constant"
2013-10-10 16:39:52 +00:00
}
],
"uuid": "2d29de24-0f40-4855-a408-6fe8b3055153"
}