UNPKG

2.15 kBJavaScriptView Raw
1hljs.registerLanguage("vbscript",(()=>{"use strict";function e(e){
2return e?"string"==typeof e?e:e.source:null}function t(...t){
3return t.map((t=>e(t))).join("")}function r(...t){return"("+((e=>{
4const t=e[e.length-1]
5;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}
6})(t).capture?"":"?:")+t.map((t=>e(t))).join("|")+")"}return e=>{
7const n=["lcase","month","vartype","instrrev","ubound","setlocale","getobject","rgb","getref","string","weekdayname","rnd","dateadd","monthname","now","day","minute","isarray","cbool","round","formatcurrency","conversions","csng","timevalue","second","year","space","abs","clng","timeserial","fixs","len","asc","isempty","maths","dateserial","atn","timer","isobject","filter","weekday","datevalue","ccur","isdate","instr","datediff","formatdatetime","replace","isnull","right","sgn","array","snumeric","log","cdbl","hex","chr","lbound","msgbox","ucase","getlocale","cos","cdate","cbyte","rtrim","join","hour","oct","typename","trim","strcomp","int","createobject","loadpicture","tan","formatnumber","mid","split","cint","sin","datepart","ltrim","sqr","time","derived","eval","date","formatpercent","exp","inputbox","left","ascw","chrw","regexp","cstr","err"]
8;return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{
9keyword:["call","class","const","dim","do","loop","erase","execute","executeglobal","exit","for","each","next","function","if","then","else","on","error","option","explicit","new","private","property","let","get","public","randomize","redim","rem","select","case","set","stop","sub","while","wend","with","end","to","elseif","is","or","xor","and","not","class_initialize","class_terminate","default","preserve","in","me","byval","byref","step","resume","goto"],
10built_in:["server","response","request","scriptengine","scriptenginebuildversion","scriptengineminorversion","scriptenginemajorversion"],
11literal:["true","false","null","nothing","empty"]},illegal:"//",contains:[{
12begin:t(r(...n),"\\s*\\("),relevance:0,keywords:{built_in:n}
13},e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{
14relevance:0}),e.C_NUMBER_MODE]}}})());
\No newline at end of file