vbnet.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. module.exports = function(hljs) {
  2. return {
  3. aliases: ['vb'],
  4. case_insensitive: true,
  5. keywords: {
  6. keyword:
  7. 'addhandler addressof alias and andalso aggregate ansi as async assembly auto await binary by byref byval ' + /* a-b */
  8. 'call case catch class compare const continue custom declare default delegate dim distinct do ' + /* c-d */
  9. 'each equals else elseif end enum erase error event exit explicit finally for friend from function ' + /* e-f */
  10. 'get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue iterator ' + /* g-i */
  11. 'join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass ' + /* j-m */
  12. 'nameof namespace narrowing new next not notinheritable notoverridable ' + /* n */
  13. 'of off on operator option optional or order orelse overloads overridable overrides ' + /* o */
  14. 'paramarray partial preserve private property protected public ' + /* p */
  15. 'raiseevent readonly redim rem removehandler resume return ' + /* r */
  16. 'select set shadows shared skip static step stop structure strict sub synclock ' + /* s */
  17. 'take text then throw to try unicode until using when where while widening with withevents writeonly xor yield', /* t-y */
  18. built_in:
  19. 'boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype ' + /* b-c */
  20. 'date decimal directcast double gettype getxmlnamespace iif integer long object ' + /* d-o */
  21. 'sbyte short single string trycast typeof uinteger ulong ushort', /* s-u */
  22. literal:
  23. 'true false nothing'
  24. },
  25. illegal: '//|{|}|endif|gosub|variant|wend|^\\$ ', /* reserved deprecated keywords */
  26. contains: [
  27. hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [{begin: '""'}]}),
  28. hljs.COMMENT(
  29. '\'',
  30. '$',
  31. {
  32. returnBegin: true,
  33. contains: [
  34. {
  35. className: 'doctag',
  36. begin: '\'\'\'|<!--|-->',
  37. contains: [hljs.PHRASAL_WORDS_MODE]
  38. },
  39. {
  40. className: 'doctag',
  41. begin: '</?', end: '>',
  42. contains: [hljs.PHRASAL_WORDS_MODE]
  43. }
  44. ]
  45. }
  46. ),
  47. hljs.C_NUMBER_MODE,
  48. {
  49. className: 'meta',
  50. begin: '#', end: '$',
  51. keywords: {'meta-keyword': 'if else elseif end region externalsource'}
  52. }
  53. ]
  54. };
  55. };