Skip to content

Commit

Permalink
update syntax highlighting keyword list
Browse files Browse the repository at this point in the history
  • Loading branch information
randomdude999 committed Feb 6, 2024
1 parent 3031772 commit 53700f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/newbook/hljs-asar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ hljsAsar = {
// I know this is ugly, but I don't know how else to solve Asar's label rules...
const asarOpcodes = ["db", "dw", "dl", "dd", "adc", "and", "asl", "bcc", "blt", "bcs", "bge", "beq", "bit", "bmi", "bne", "bpl", "bra", "brk", "brl", "bvc", "bvs", "clc", "cld", "cli", "clv", "cmp", "cop", "cpx", "cpy", "dec", "dea", "dex", "dey", "eor", "inc", "ina", "inx", "iny", "jmp", "jml", "jsr", "jsl", "lda", "ldx", "ldy", "lsr", "mvn", "mvp", "nop", "ora", "pea", "pei", "per", "pha", "phb", "phd", "phk", "php", "phx", "phy", "pla", "plb", "pld", "plp", "plx", "ply", "rep", "rol", "ror", "rti", "rtl", "rts", "sbc", "sec", "sed", "sei", "sep", "sta", "stp", "stx", "sty", "stz", "tax", "tay", "tcd", "tcs", "tdc", "trb", "tsc", "tsb", "tsx", "txa", "txs", "txy", "tya", "tyx", "wai", "wdm", "xba", "xce", "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "add", "alt1", "alt2", "alt3", "asr", "bic", "cache", "cmode", "color", "div2", "fmult", "from", "getb", "getbh", "getbl", "getbs", "getc", "hib", "ibt", "iwt", "ldb", "ldw", "link", "ljmp", "lm", "lms", "lmult", "lob", "loop", "merge", "mult", "not", "or", "plot", "ramb", "romb", "rpix", "sbk", "sex", "sm", "sms", "stb", "stop", "stw", "sub", "swap", "to", "umult", "with", "xor", "addw", "ya", "and1", "bbc0", "bbc1", "bbc2", "bbc3", "bbc4", "bbc5", "bbc6", "bbc7", "bbs0", "bbs1", "bbs2", "bbs3", "bbs4", "bbs5", "bbs6", "bbs7", "call", "cbne", "clr0", "clr1", "clr2", "clr3", "clr4", "clr5", "clr6", "clr7", "clrc", "clrp", "clrv", "cmpw", "daa", "das", "dbnz", "decw", "di", "div", "ei", "eor1", "incw", "mov", "sp", "mov1", "movw", "mul", "not1", "notc", "or1", "pcall", "pop", "push", "ret", "reti", "set0", "set1", "set2", "set3", "set4", "set5", "set6", "set7", "setc", "setp", "sleep", "subw", "tcall", "tclr", "tset", "xcn", "lea", "move", "moves", "moveb", "movew"];

const asarKeywords = ["lorom", "hirom", "exlorom", "exhirom", "sa1rom", "fullsa1rom", "sfxrom", "norom", /* "macro", */ "endmacro", "struct", "endstruct", "extends", "incbin", "incsrc", "fillbyte", "fillword", "filllong", "filldword", "fill", "padbyte", "pad", "padword", "padlong", "paddword", "cleartable", "skip", "namespace", "print", "org", "base", "on", "off", "reset", "freespaceuse", "pc", "bytes", "hex", "freespace", "freecode", "freedata", "ram", "noram", "align", "cleaned", "static", "autoclean", "prot", "pushpc", "pullpc", "pushbase", "pullbase", "function", "if", "else", "elseif", "endif", "while", "endwhile", "for", "endfor", "assert", "arch", "65816", "spc700", "superfx", "bankcross", "full", "half", "bank", "noassume", "auto", "asar", "includefrom", "includeonce", "include", "error", "double", "pushtable", "pulltable", "undef", "check", "title", "nested", "warnings", "push", "pull", "disable", "enable", "warn", "address", "dpbase", "optimize", "dp", "none", "always", "default", "mirrors", "global", "spcblock", "endspcblock", "nspc", "custom", "execute", "offset", "pushns", "pullns", "segment", "start", "pin", "norats", "freespacebyte"];
const asarKeywords = ["lorom", "hirom", "exlorom", "exhirom", "sa1rom", "fullsa1rom", "sfxrom", "norom", /* "macro", */ "endmacro", "struct", "endstruct", "extends", "incbin", "incsrc", "fillbyte", "fillword", "filllong", "filldword", "fill", "padbyte", "pad", "padword", "padlong", "paddword", "cleartable", "skip", "namespace", "print", "org", "base", "on", "off", "reset", "freespaceuse", "pc", "bytes", "hex", "freespace", "freespace_settings", "freecode", "freedata", "ram", "noram", "align", "noalign", "cleaned", "nocleaned", "static", "nostatic", "autoclean", "prot", "pushpc", "pullpc", "pushbase", "pullbase", "function", "if", "else", "elseif", "endif", "while", "endwhile", "for", "endfor", "assert", "arch", "65816", "spc700", "superfx", "bankcross", "full", "half", "bank", "noassume", "auto", "asar", "includefrom", "includeonce", "include", "error", "double", "pushtable", "pulltable", "undef", "check", "title", "nested", "warnings", "push", "pull", "disable", "enable", "warn", "address", "dpbase", "optimize", "dp", "none", "always", "default", "mirrors", "global", "spcblock", "endspcblock", "nspc", "custom", "execute", "offset", "pushns", "pullns", "segment", "start", "pin", "rats", "norats", "freespacebyte"];

const asarIntrinsicFunctions = ["read1", "read2", "read3", "read4", "canread1", "canread2", "canread4", "sqrt", "sin", "cos", "tan", "asin", "acos", "atan", "arcsin", "arccos", "arctan", "log", "log10", "log2", "readfile1", "readfile2", "readfile3", "readfile4", "canreadfile1", "canreadfile2", "canreadfile3", "canreadfile4", "canreadfile", "filesize", "getfilestatus", "snestopc", "pctosnes", "max", "min", "clamp", "safediv", "select", "not", "equal", "notequal", "less", "lessequal", "greater", "greaterequal", "and", "or", "nand", "nor", "xor", "defined", "sizeof", "objectsize", "stringsequal", "stringsequalnocase"];

Expand Down
2 changes: 1 addition & 1 deletion docs/newbook/theme/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ hljsAsar = {
// I know this is ugly, but I don't know how else to solve Asar's label rules...
const asarOpcodes = ["db", "dw", "dl", "dd", "adc", "and", "asl", "bcc", "blt", "bcs", "bge", "beq", "bit", "bmi", "bne", "bpl", "bra", "brk", "brl", "bvc", "bvs", "clc", "cld", "cli", "clv", "cmp", "cop", "cpx", "cpy", "dec", "dea", "dex", "dey", "eor", "inc", "ina", "inx", "iny", "jmp", "jml", "jsr", "jsl", "lda", "ldx", "ldy", "lsr", "mvn", "mvp", "nop", "ora", "pea", "pei", "per", "pha", "phb", "phd", "phk", "php", "phx", "phy", "pla", "plb", "pld", "plp", "plx", "ply", "rep", "rol", "ror", "rti", "rtl", "rts", "sbc", "sec", "sed", "sei", "sep", "sta", "stp", "stx", "sty", "stz", "tax", "tay", "tcd", "tcs", "tdc", "trb", "tsc", "tsb", "tsx", "txa", "txs", "txy", "tya", "tyx", "wai", "wdm", "xba", "xce", "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "add", "alt1", "alt2", "alt3", "asr", "bic", "cache", "cmode", "color", "div2", "fmult", "from", "getb", "getbh", "getbl", "getbs", "getc", "hib", "ibt", "iwt", "ldb", "ldw", "link", "ljmp", "lm", "lms", "lmult", "lob", "loop", "merge", "mult", "not", "or", "plot", "ramb", "romb", "rpix", "sbk", "sex", "sm", "sms", "stb", "stop", "stw", "sub", "swap", "to", "umult", "with", "xor", "addw", "ya", "and1", "bbc0", "bbc1", "bbc2", "bbc3", "bbc4", "bbc5", "bbc6", "bbc7", "bbs0", "bbs1", "bbs2", "bbs3", "bbs4", "bbs5", "bbs6", "bbs7", "call", "cbne", "clr0", "clr1", "clr2", "clr3", "clr4", "clr5", "clr6", "clr7", "clrc", "clrp", "clrv", "cmpw", "daa", "das", "dbnz", "decw", "di", "div", "ei", "eor1", "incw", "mov", "sp", "mov1", "movw", "mul", "not1", "notc", "or1", "pcall", "pop", "push", "ret", "reti", "set0", "set1", "set2", "set3", "set4", "set5", "set6", "set7", "setc", "setp", "sleep", "subw", "tcall", "tclr", "tset", "xcn", "lea", "move", "moves", "moveb", "movew"];

const asarKeywords = ["lorom", "hirom", "exlorom", "exhirom", "sa1rom", "fullsa1rom", "sfxrom", "norom", /* "macro", */ "endmacro", "struct", "endstruct", "extends", "incbin", "incsrc", "fillbyte", "fillword", "filllong", "filldword", "fill", "padbyte", "pad", "padword", "padlong", "paddword", "cleartable", "skip", "namespace", "print", "org", "base", "on", "off", "reset", "freespaceuse", "pc", "bytes", "hex", "freespace", "freecode", "freedata", "ram", "noram", "align", "cleaned", "static", "autoclean", "prot", "pushpc", "pullpc", "pushbase", "pullbase", "function", "if", "else", "elseif", "endif", "while", "endwhile", "for", "endfor", "assert", "arch", "65816", "spc700", "superfx", "bankcross", "full", "half", "bank", "noassume", "auto", "asar", "includefrom", "includeonce", "include", "error", "double", "pushtable", "pulltable", "undef", "check", "title", "nested", "warnings", "push", "pull", "disable", "enable", "warn", "address", "dpbase", "optimize", "dp", "none", "always", "default", "mirrors", "global", "spcblock", "endspcblock", "nspc", "custom", "execute", "offset", "pushns", "pullns", "segment", "start", "pin", "norats", "freespacebyte"];
const asarKeywords = ["lorom", "hirom", "exlorom", "exhirom", "sa1rom", "fullsa1rom", "sfxrom", "norom", /* "macro", */ "endmacro", "struct", "endstruct", "extends", "incbin", "incsrc", "fillbyte", "fillword", "filllong", "filldword", "fill", "padbyte", "pad", "padword", "padlong", "paddword", "cleartable", "skip", "namespace", "print", "org", "base", "on", "off", "reset", "freespaceuse", "pc", "bytes", "hex", "freespace", "freespace_settings", "freecode", "freedata", "ram", "noram", "align", "noalign", "cleaned", "nocleaned", "static", "nostatic", "autoclean", "prot", "pushpc", "pullpc", "pushbase", "pullbase", "function", "if", "else", "elseif", "endif", "while", "endwhile", "for", "endfor", "assert", "arch", "65816", "spc700", "superfx", "bankcross", "full", "half", "bank", "noassume", "auto", "asar", "includefrom", "includeonce", "include", "error", "double", "pushtable", "pulltable", "undef", "check", "title", "nested", "warnings", "push", "pull", "disable", "enable", "warn", "address", "dpbase", "optimize", "dp", "none", "always", "default", "mirrors", "global", "spcblock", "endspcblock", "nspc", "custom", "execute", "offset", "pushns", "pullns", "segment", "start", "pin", "rats", "norats", "freespacebyte"];

const asarIntrinsicFunctions = ["read1", "read2", "read3", "read4", "canread1", "canread2", "canread4", "sqrt", "sin", "cos", "tan", "asin", "acos", "atan", "arcsin", "arccos", "arctan", "log", "log10", "log2", "readfile1", "readfile2", "readfile3", "readfile4", "canreadfile1", "canreadfile2", "canreadfile3", "canreadfile4", "canreadfile", "filesize", "getfilestatus", "snestopc", "pctosnes", "max", "min", "clamp", "safediv", "select", "not", "equal", "notequal", "less", "lessequal", "greater", "greaterequal", "and", "or", "nand", "nor", "xor", "defined", "sizeof", "objectsize", "stringsequal", "stringsequalnocase"];

Expand Down
2 changes: 1 addition & 1 deletion ext/vim/asar.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
" i trust that if you use vim you know how to install syntax files.

syn case ignore
syn keyword asarCmd lorom hirom exlorom exhirom sa1rom fullsa1rom sfxrom norom endmacro struct endstruct extends incbin incsrc fillbyte fillword filllong filldword fill padbyte pad padword padlong paddword cleartable skip namespace print org base on off reset freespaceuse pc bytes freespace freecode freedata ram noram align cleaned static autoclean prot pushpc pullpc pushbase pullbase function if else elseif endif while endwhile for endfor assert arch 65816 spc700 superfx bankcross full half bank noassume auto asar includefrom includeonce include error double pushtable pulltable undef check title nested warn address dpbase optimize dp none always default mirrors global spcblock endspcblock nspc custom execute offset pushns pullns segment start pin norats freespacebyte
syn keyword asarCmd lorom hirom exlorom exhirom sa1rom fullsa1rom sfxrom norom endmacro struct endstruct extends incbin incsrc fillbyte fillword filllong filldword fill padbyte pad padword padlong paddword cleartable skip namespace print org base on off reset freespaceuse pc bytes freespace freespace_settings freecode freedata ram noram align noalign cleaned nocleaned static nostatic autoclean prot pushpc pullpc pushbase pullbase function if else elseif endif while endwhile for endfor assert arch 65816 spc700 superfx bankcross full half bank noassume auto asar includefrom includeonce include error double pushtable pulltable undef check title nested warn address dpbase optimize dp none always default mirrors global spcblock endspcblock nspc custom execute offset pushns pullns segment start pin rats norats freespacebyte
syn match asarMacroDefStart "macro " contained
syn match asarMacroDef "macro [0-9a-z_]\+\ze(" contains=asarMacroDefStart
syn keyword asarInsn db dw dl dd r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15
Expand Down

0 comments on commit 53700f0

Please sign in to comment.