Skip to content

Commit 6a9c895

Browse files
clsomarijnh
authored andcommitted
[vb mode] Update vb.net keywords
1 parent 1c2b083 commit 6a9c895

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

mode/vb/vb.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ CodeMirror.defineMode("vb", function(conf, parserConf) {
2525
var tripleDelimiters = new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))");
2626
var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*");
2727

28-
var openingKeywords = ['class','module', 'sub','enum','select','while','if','function', 'get','set','property', 'try'];
29-
var middleKeywords = ['else','elseif','case', 'catch'];
28+
var openingKeywords = ['class','module', 'sub','enum','select','while','if','function', 'get','set','property', 'try', 'structure', 'synclock', 'using', 'with'];
29+
var middleKeywords = ['else','elseif','case', 'catch', 'finally'];
3030
var endKeywords = ['next','loop'];
3131

32-
var operatorKeywords = ['and', 'or', 'not', 'xor', 'in'];
32+
var operatorKeywords = ['and', "andalso", 'or', 'orelse', 'xor', 'in', 'not', 'is', 'isnot', 'like'];
3333
var wordOperators = wordRegexp(operatorKeywords);
34-
var commonKeywords = ['as', 'dim', 'break', 'continue','optional', 'then', 'until',
35-
'goto', 'byval','byref','new','handles','property', 'return',
36-
'const','private', 'protected', 'friend', 'public', 'shared', 'static', 'true','false'];
37-
var commontypes = ['integer','string','double','decimal','boolean','short','char', 'float','single'];
34+
35+
var commonKeywords = ["#const", "#else", "#elseif", "#end", "#if", "#region", "addhandler", "addressof", "alias", "as", "byref", "byval", "cbool", "cbyte", "cchar", "cdate", "cdbl", "cdec", "cint", "clng", "cobj", "compare", "const", "continue", "csbyte", "cshort", "csng", "cstr", "cuint", "culng", "cushort", "declare", "default", "delegate", "dim", "directcast", "each", "erase", "error", "event", "exit", "explicit", "false", "for", "friend", "gettype", "goto", "handles", "implements", "imports", "infer", "inherits", "interface", "isfalse", "istrue", "lib", "me", "mod", "mustinherit", "mustoverride", "my", "mybase", "myclass", "namespace", "narrowing", "new", "nothing", "notinheritable", "notoverridable", "of", "off", "on", "operator", "option", "optional", "out", "overloads", "overridable", "overrides", "paramarray", "partial", "private", "protected", "public", "raiseevent", "readonly", "redim", "removehandler", "resume", "return", "shadows", "shared", "static", "step", "stop", "strict", "then", "throw", "to", "true", "trycast", "typeof", "until", "until", "when", "widening", "withevents", "writeonly"];
36+
37+
var commontypes = ['object', 'boolean', 'char', 'string', 'byte', 'sbyte', 'short', 'ushort', 'int16', 'uint16', 'integer', 'uinteger', 'int32', 'uint32', 'long', 'ulong', 'int64', 'uint64', 'decimal', 'single', 'double', 'float', 'date', 'datetime', 'intptr', 'uintptr'];
3838

3939
var keywords = wordRegexp(commonKeywords);
4040
var types = wordRegexp(commontypes);

0 commit comments

Comments
 (0)