Skip to content

Commit

Permalink
VB: Added missing keywords (#2376)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed May 29, 2020
1 parent 0255cb6 commit ba5ac1d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/prism-visual-basic.js
Expand Up @@ -20,7 +20,7 @@ Prism.languages['visual-basic'] = {
},
'number': /(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,
'boolean': /\b(?:True|False|Nothing)\b/i,
'keyword': /\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,
'keyword': /\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,
'operator': [
/[+\-*/\\^<=>&#@$%!]/,
{
Expand Down
2 changes: 1 addition & 1 deletion components/prism-visual-basic.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion tests/languages/visual-basic/keyword_feature.test
Expand Up @@ -32,6 +32,7 @@ CType
CUInt
CULng
CUShort
Currency
Date
Decimal
Declare
Expand Down Expand Up @@ -133,6 +134,7 @@ Throw
To
Try
TryCast
Type
TypeOf
UInteger
ULong
Expand Down Expand Up @@ -185,6 +187,7 @@ Xor
["keyword", "CUInt"],
["keyword", "CULng"],
["keyword", "CUShort"],
["keyword", "Currency"],
["keyword", "Date"],
["keyword", "Decimal"],
["keyword", "Declare"],
Expand Down Expand Up @@ -286,6 +289,7 @@ Xor
["keyword", "To"],
["keyword", "Try"],
["keyword", "TryCast"],
["keyword", "Type"],
["keyword", "TypeOf"],
["keyword", "UInteger"],
["keyword", "ULong"],
Expand All @@ -304,4 +308,4 @@ Xor

----------------------------------------------------

Checks for all keywords.
Checks for all keywords.

0 comments on commit ba5ac1d

Please sign in to comment.