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