main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
966 bytes
|
Line | |
---|
1 | Prism.languages.asm6502 = {
|
---|
2 | 'comment': /;.*/,
|
---|
3 | 'directive': {
|
---|
4 | pattern: /\.\w+(?= )/,
|
---|
5 | alias: 'property'
|
---|
6 | },
|
---|
7 | 'string': /(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
---|
8 | 'op-code': {
|
---|
9 | pattern: /\b(?: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|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/,
|
---|
10 | alias: 'keyword'
|
---|
11 | },
|
---|
12 | 'hex-number': {
|
---|
13 | pattern: /#?\$[\da-f]{1,4}\b/i,
|
---|
14 | alias: 'number'
|
---|
15 | },
|
---|
16 | 'binary-number': {
|
---|
17 | pattern: /#?%[01]+\b/,
|
---|
18 | alias: 'number'
|
---|
19 | },
|
---|
20 | 'decimal-number': {
|
---|
21 | pattern: /#?\b\d+\b/,
|
---|
22 | alias: 'number'
|
---|
23 | },
|
---|
24 | 'register': {
|
---|
25 | pattern: /\b[xya]\b/i,
|
---|
26 | alias: 'variable'
|
---|
27 | },
|
---|
28 | 'punctuation': /[(),:]/
|
---|
29 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.