vbnet.js 2.5 KB

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