vbscript.js 2.1 KB

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