|
@@ -0,0 +1,126 @@
|
|
1
|
+{
|
|
2
|
+ "scopeName": "source.arm.pokescript",
|
|
3
|
+ "name": "pokescript",
|
|
4
|
+ "fileTypes": [
|
|
5
|
+ ".s", ".S", ".asm", ".rbc"
|
|
6
|
+ ],
|
|
7
|
+ "patterns": [
|
|
8
|
+ {
|
|
9
|
+ "match": "([;@]|//).*$",
|
|
10
|
+ "name": "comment.arm"
|
|
11
|
+ },
|
|
12
|
+ {
|
|
13
|
+ "name": "comment.arm",
|
|
14
|
+ "begin": "\\/\\*",
|
|
15
|
+ "beginCaptures": {
|
|
16
|
+ "0": {
|
|
17
|
+ "name": "comment.begin.arm"
|
|
18
|
+ }
|
|
19
|
+ },
|
|
20
|
+ "endCaptures": {
|
|
21
|
+ "0": {
|
|
22
|
+ "name": "comment.end.arm"
|
|
23
|
+ }
|
|
24
|
+ },
|
|
25
|
+ "end": "\\*\\/"
|
|
26
|
+ },
|
|
27
|
+ {
|
|
28
|
+ "match": "^\\s*\\.?\\w+:\\s*(?=$|;)",
|
|
29
|
+ "name": "routine.arm"
|
|
30
|
+ },
|
|
31
|
+ {
|
|
32
|
+ "name": "invalid.illegal.string.arm",
|
|
33
|
+ "match": "\"[^\"]+$"
|
|
34
|
+ },
|
|
35
|
+ {
|
|
36
|
+ "name": "string.quoted.arm",
|
|
37
|
+ "begin": "\"",
|
|
38
|
+ "end": "\""
|
|
39
|
+ },
|
|
40
|
+ {
|
|
41
|
+ "match": "\\'\\S\\'",
|
|
42
|
+ "name": "string.char.arm"
|
|
43
|
+ },
|
|
44
|
+ {
|
|
45
|
+ "match": "#?[0-9]+\\b",
|
|
46
|
+ "name": "constant.numeric.dec.arm"
|
|
47
|
+ },
|
|
48
|
+ {
|
|
49
|
+ "match": "#-?[a-zA-Z_][0-9a-zA-Z_]*\\b",
|
|
50
|
+ "name": "variable.named.arm"
|
|
51
|
+ },
|
|
52
|
+ {
|
|
53
|
+ "match": "#?-?(0x|&)[0-9a-fA-F_]+\\b",
|
|
54
|
+ "name": "constant.numeric.hex.arm"
|
|
55
|
+ },
|
|
56
|
+ {
|
|
57
|
+ "match": "\\b(?i)([rcp]([0-9]|1[0-5])|[xw]([0-9]|1[0-5]|2[0-5]|30)|wzr|xzr|wsp|fpsr|fpcr|a[1-4]|v[1-8]|sl|sb|fp|ip|sp|lr|(c|s)psr(_c)?|pc|[sd]3[0-1]|[sd][12][0-9]|[sd][0-9]|fpsid|fpscr|fpexc|q3[0-1]|q2[0-9]|q1[0-9]|q[0-9]|APSR_nzcv|sy)(?-i)(!|\\b)",
|
|
58
|
+ "name": "storage.other.register.arm"
|
|
59
|
+ },
|
|
60
|
+ {
|
|
61
|
+ "name": "storage.memaddress.arm",
|
|
62
|
+ "begin": "\\[",
|
|
63
|
+ "end": "\\]",
|
|
64
|
+ "patterns": [
|
|
65
|
+ {
|
|
66
|
+ "include": "$base"
|
|
67
|
+ }
|
|
68
|
+ ]
|
|
69
|
+ },
|
|
70
|
+ {
|
|
71
|
+ "name": "storage.stack.arm",
|
|
72
|
+ "begin": "\\{",
|
|
73
|
+ "end": "\\}\\^?",
|
|
74
|
+ "patterns": [
|
|
75
|
+ {
|
|
76
|
+ "include": "$base"
|
|
77
|
+ }
|
|
78
|
+ ]
|
|
79
|
+ },
|
|
80
|
+ {
|
|
81
|
+ "match": "\\b(?i)(v?(add|cvt|sub|mov|trn|cmp|div|qdmulh|mrs|mul|ld1|qadd|qshrun|st[1234]|addw|mull|mlal|rshrn|swp|qmovunand|m(rs|sr)|eor|sub|rsb|adc|sbc|rsc|and|tst|teq|cmp|cmn|orr|mov|bic|mvn|neg|lsr|lsl|ror|asr)s?|mul|mla|mull|smlabb|mov(w|t)|rev(8|16)?|pld|adr|adrl|vswp)(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i)\\b",
|
|
82
|
+ "name": "support.mnemonic.arithmetic.arm"
|
|
83
|
+ },
|
|
84
|
+ {
|
|
85
|
+ "match": "\\b(?i)(swi|svc|wfi|dmb|clrex|dsb|isb|v(ldr|str|push|pop)|push|pop|b(l|l?x|l?r)?|(i|e)?ret|(st|ld)(p|r(ex|s?(h|b)|d)?|m((f|e)(d|a)|(d|i)(b|a))?))(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i)\\b",
|
|
86
|
+ "name": "support.mnemonic.memory.arm"
|
|
87
|
+ },
|
|
88
|
+ {
|
|
89
|
+ "match": "\\b(?i)(def(b|w|s)|equ|align\\s.+\\.s)(?-i)\\b",
|
|
90
|
+ "name": "keyword.control.define.arm"
|
|
91
|
+ },
|
|
92
|
+ {
|
|
93
|
+ "name": "keyword.control.directive.arm",
|
|
94
|
+ "match": "\\.(?i)(globl|global|macro|endm|purgem|if|elseif|else|endif|section|text|data|bss|arm|align|balign|irp|rept|endr|req|unreq|error|short|func|endfunc|hidden|type|fpu|arch|code|altmacro|object_arch|word|int|string)(?-i)\\b"
|
|
95
|
+ },
|
|
96
|
+ {
|
|
97
|
+ "name": "keyword.other.preprocessor.arm",
|
|
98
|
+ "match": "^\\s*\\.?(define|defined|elif|else|if|ifdef|ifndef|line|include|get|pragma|undef|endif)\\b"
|
|
99
|
+ },
|
|
100
|
+ {
|
|
101
|
+ "match": "\\b\\=",
|
|
102
|
+ "name": "keyword.control.evaluation"
|
|
103
|
+ },
|
|
104
|
+ {
|
|
105
|
+ "match": "\\b(?i)(nop(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?)(?-i)\\b",
|
|
106
|
+ "name": "comment.nop.arm"
|
|
107
|
+ },
|
|
108
|
+ {
|
|
109
|
+ "match": "\\b(?i)(nop|nop1)(?-i)\\b",
|
|
110
|
+ "name": "comment.nop.arm.pokescript"
|
|
111
|
+ },
|
|
112
|
+ {
|
|
113
|
+ "match": "\\b(?i)(call|goto|gotoif|callif|callstd|killscript|loadpointer|writebytetooffset|setvar|addvar|subvar|copyvar|compare|comparevars|callasm|special|special2|waitstate|pause|setflag|clearflag|checkflag|resetvars|sound|checksound|fanfare|waitfanfare|playsong|playsong|songfadedefault|fadesong|fadeout|fadein|warp|warpmuted|warpwalk|walphole|warpteleport|setwarpplace|getplayerpos|countpokemon|additem|removeitem|checkitemroom|checkitem|checkitemtype|addpcitem|checkpcitem|applymovement|applymovementpos|waitmovement|waitmovementpos|hidesprite|hidespritepos|showsprite|showspritepos|movesprite|spriteinvisible|spriteinvisible|faceplayer|spriteface|trainerbattle|repeattrainerbattle|endtrainerbattle|endtrainerbattle2|checktrainerflag|settrainerflag|cleartrainerflag|movesprite2|moveoffscreen|spritebehave|waitmsg|preparemsg|closeonkeypress|lockall|lock|releaseall|release|waitkeypress|yesnobox|multichoice|multichoice2|multichoice3|showpokepic|hidepokepic|braille|givepokemon|giveegg|checkattack|bufferpokemon|bufferfirstpokemon|bufferpartypokemon|bufferitem|bufferattack|buffernumber|bufferstd|bufferstring|pokemart|pokemart3|random|givemoney|paymoney|checkmoney|showmoney|hidemoney|updatemoney|fadescreen|fadescreendelay|darken|lighten|doanimation|setanimation|checkanimation|sethealingplace|checkgender|cry|setmaptile|resetweather|setweather|doweather|spritelevelup|restorespritelevel|createsprite|spriteface2|setdooropened|setdoorclosed|doorchange|setdooropened2|setdoorclosed2|setwildbattle|dowildbattle|savincrementkey|waitcry|setworldmapflag|bufferitems)(?-i)\\b",
|
|
114
|
+ "name": "entity.name.function.arm.pokescript"
|
|
115
|
+ },
|
|
116
|
+
|
|
117
|
+ {
|
|
118
|
+ "match":"\\b(?i)(batchmaptilefromto||batchmaptiletofrom|sethiddenflags|seteffect|setecutscene|clearcutscene|pokemsg|beben|lookbattle|gymbattle|betweenbattle|scriptbattle|doublebattle|doublegymbattle|winlosebattle|spotscript|giveitem|giteitem2|wildbattle|wildbattle2|wildbattlemusic|customtrainerbattlemusic|colorflicker|mugmsg|mugrival|transparenzon|transparenzoff|battlescreen|cameramove|walkingscript|walingscripton|walkingscripton|writemusikon|writemusikoff|msgbox)(?-i)\\b",
|
|
119
|
+ "name": "keyword.other.preprocessor.arm.pokescript"
|
|
120
|
+ },
|
|
121
|
+ {
|
|
122
|
+ "match":"\\b(?i)(end|return)?(?-i)\\b",
|
|
123
|
+ "name": "keyword.control.arm.pokescript"
|
|
124
|
+ }
|
|
125
|
+ ]
|
|
126
|
+}
|