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:
2.8 KB
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | module.exports = uorazor
|
---|
4 | uorazor.displayName = 'uorazor'
|
---|
5 | uorazor.aliases = []
|
---|
6 | function uorazor(Prism) {
|
---|
7 | Prism.languages.uorazor = {
|
---|
8 | 'comment-hash': {
|
---|
9 | pattern: /#.*/,
|
---|
10 | alias: 'comment',
|
---|
11 | greedy: true
|
---|
12 | },
|
---|
13 | 'comment-slash': {
|
---|
14 | pattern: /\/\/.*/,
|
---|
15 | alias: 'comment',
|
---|
16 | greedy: true
|
---|
17 | },
|
---|
18 | string: {
|
---|
19 | pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
---|
20 | inside: {
|
---|
21 | punctuation: /^['"]|['"]$/
|
---|
22 | },
|
---|
23 | greedy: true
|
---|
24 | },
|
---|
25 | 'source-layers': {
|
---|
26 | pattern:
|
---|
27 | /\b(?:arms|backpack|blue|bracelet|cancel|clear|cloak|criminal|earrings|enemy|facialhair|friend|friendly|gloves|gray|grey|ground|hair|head|innerlegs|innertorso|innocent|lefthand|middletorso|murderer|neck|nonfriendly|onehandedsecondary|outerlegs|outertorso|pants|red|righthand|ring|self|shirt|shoes|talisman|waist)\b/i,
|
---|
28 | alias: 'function'
|
---|
29 | },
|
---|
30 | 'source-commands': {
|
---|
31 | pattern:
|
---|
32 | /\b(?:alliance|attack|cast|clearall|clearignore|clearjournal|clearlist|clearsysmsg|createlist|createtimer|dclick|dclicktype|dclickvar|dress|dressconfig|drop|droprelloc|emote|getlabel|guild|gumpclose|gumpresponse|hotkey|ignore|lasttarget|lift|lifttype|menu|menuresponse|msg|org|organize|organizer|overhead|pause|poplist|potion|promptresponse|pushlist|removelist|removetimer|rename|restock|say|scav|scavenger|script|setability|setlasttarget|setskill|settimer|setvar|sysmsg|target|targetloc|targetrelloc|targettype|undress|unignore|unsetvar|useobject|useonce|useskill|usetype|virtue|wait|waitforgump|waitformenu|waitforprompt|waitforstat|waitforsysmsg|waitfortarget|walk|wfsysmsg|wft|whisper|yell)\b/,
|
---|
33 | alias: 'function'
|
---|
34 | },
|
---|
35 | 'tag-name': {
|
---|
36 | pattern: /(^\{%-?\s*)\w+/,
|
---|
37 | lookbehind: true,
|
---|
38 | alias: 'keyword'
|
---|
39 | },
|
---|
40 | delimiter: {
|
---|
41 | pattern: /^\{[{%]-?|-?[%}]\}$/,
|
---|
42 | alias: 'punctuation'
|
---|
43 | },
|
---|
44 | function:
|
---|
45 | /\b(?:atlist|close|closest|count|counter|counttype|dead|dex|diffhits|diffmana|diffstam|diffweight|find|findbuff|finddebuff|findlayer|findtype|findtypelist|followers|gumpexists|hidden|hits|hp|hue|human|humanoid|ingump|inlist|insysmessage|insysmsg|int|invul|lhandempty|list|listexists|mana|maxhits|maxhp|maxmana|maxstam|maxweight|monster|mounted|name|next|noto|paralyzed|poisoned|position|prev|previous|queued|rand|random|rhandempty|skill|stam|str|targetexists|timer|timerexists|varexist|warmode|weight)\b/,
|
---|
46 | keyword:
|
---|
47 | /\b(?:and|as|break|continue|else|elseif|endfor|endif|endwhile|for|if|loop|not|or|replay|stop|while)\b/,
|
---|
48 | boolean: /\b(?:false|null|true)\b/,
|
---|
49 | number: /\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,
|
---|
50 | operator: [
|
---|
51 | {
|
---|
52 | pattern:
|
---|
53 | /(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,
|
---|
54 | lookbehind: true
|
---|
55 | },
|
---|
56 | /[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/
|
---|
57 | ],
|
---|
58 | punctuation: /[()\[\]{}:.,]/
|
---|
59 | }
|
---|
60 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.