{ "scopeName": "source.arm.pokescript", "name": "pokescript", "fileTypes": [ ".s", ".S", ".asm", ".rbc" ], "patterns": [ { "match": "([;@]|//).*$", "name": "comment.arm" }, { "name": "comment.arm", "begin": "\\/\\*", "beginCaptures": { "0": { "name": "comment.begin.arm" } }, "endCaptures": { "0": { "name": "comment.end.arm" } }, "end": "\\*\\/" }, { "match": "^\\s*\\.?\\w+:\\s*(?=$|;)", "name": "routine.arm" }, { "name": "invalid.illegal.string.arm", "match": "\"[^\"]+$" }, { "name": "string.quoted.arm", "begin": "\"", "end": "\"" }, { "match": "\\'\\S\\'", "name": "string.char.arm" }, { "match": "#?[0-9]+\\b", "name": "constant.numeric.dec.arm" }, { "match": "#-?[a-zA-Z_][0-9a-zA-Z_]*\\b", "name": "variable.named.arm" }, { "match": "#?-?(0x|&)[0-9a-fA-F_]+\\b", "name": "constant.numeric.hex.arm" }, { "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)", "name": "storage.other.register.arm" }, { "name": "storage.memaddress.arm", "begin": "\\[", "end": "\\]", "patterns": [ { "include": "$base" } ] }, { "name": "storage.stack.arm", "begin": "\\{", "end": "\\}\\^?", "patterns": [ { "include": "$base" } ] }, { "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", "name": "support.mnemonic.arithmetic.arm" }, { "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", "name": "support.mnemonic.memory.arm" }, { "match": "\\b(?i)(def(b|w|s)|equ|align\\s.+\\.s)(?-i)\\b", "name": "keyword.control.define.arm" }, { "name": "keyword.control.directive.arm", "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" }, { "name": "keyword.other.preprocessor.arm", "match": "^\\s*\\.?(define|defined|elif|else|if|ifdef|ifndef|line|include|get|pragma|undef|endif)\\b" }, { "match": "\\b\\=", "name": "keyword.control.evaluation" }, { "match": "\\b(?i)(nop(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?)(?-i)\\b", "name": "comment.nop.arm" }, { "match": "\\b(?i)(nop|nop1)(?-i)\\b", "name": "comment.nop.arm.pokescript" }, { "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", "name": "entity.name.function.arm.pokescript" }, { "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", "name": "keyword.other.preprocessor.arm.pokescript" }, { "match":"\\b(?i)(end|return)?(?-i)\\b", "name": "keyword.control.arm.pokescript" } ] }