vbscript.js 1.7 KB

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