vbscript.js (2120B)
1 /* 2 Language: VBScript 3 Description: VBScript ("Microsoft Visual Basic Scripting Edition") is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. 4 Author: Nikita Ledyaev <lenikita@yandex.ru> 5 Contributors: Michal Gabrukiewicz <mgabru@gmail.com> 6 Website: https://en.wikipedia.org/wiki/VBScript 7 Category: scripting 8 */ 9 10 function vbscript(hljs) { 11 return { 12 name: 'VBScript', 13 aliases: ['vbs'], 14 case_insensitive: true, 15 keywords: { 16 keyword: 17 'call class const dim do loop erase execute executeglobal exit for each next function ' + 18 'if then else on error option explicit new private property let get public randomize ' + 19 'redim rem select case set stop sub while wend with end to elseif is or xor and not ' + 20 'class_initialize class_terminate default preserve in me byval byref step resume goto', 21 built_in: 22 'lcase month vartype instrrev ubound setlocale getobject rgb getref string ' + 23 'weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency ' + 24 'conversions csng timevalue second year space abs clng timeserial fixs len asc ' + 25 'isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate ' + 26 'instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex ' + 27 'chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim ' + 28 'strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion ' + 29 'scriptengine split scriptengineminorversion cint sin datepart ltrim sqr ' + 30 'scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw ' + 31 'chrw regexp server response request cstr err', 32 literal: 33 'true false null nothing empty' 34 }, 35 illegal: '//', 36 contains: [ 37 hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [{begin: '""'}]}), 38 hljs.COMMENT( 39 /'/, 40 /$/, 41 { 42 relevance: 0 43 } 44 ), 45 hljs.C_NUMBER_MODE 46 ] 47 }; 48 } 49 50 module.exports = vbscript;