Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit 7d46f35

Browse files
author
mikesamuel@gmail.com
committed
fixed VB REM style comments per issue 254
1 parent 1f1e74c commit 7d46f35

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/lang-vb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ PR['registerLangHandler'](
4949
[
5050
[PR['PR_KEYWORD'], /^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, null],
5151
// A second comment form
52-
[PR['PR_COMMENT'], /^REM[^\r\n\u2028\u2029]*/i],
52+
[PR['PR_COMMENT'], /^REM\b[^\r\n\u2028\u2029]*/i],
5353
// A boolean, numeric, or date literal.
5454
[PR['PR_LITERAL'],
5555
/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],

tests/prettify_test.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,9 @@ <h1>Bug 27 - VBScript w/ language specified</h1>
908908

909909
' This prints out: &quot;.
910910
Console.WriteLine(""""c)
911+
912+
REM an old-style comment
913+
REMOVE(not_a_comment)
911914
End Sub
912915
End Module
913916

@@ -2485,6 +2488,9 @@ <h1>Go mode</h1>
24852488
'`PLN\n' +
24862489
' Console`END`PUN.`END`PLNWriteLine`END' +
24872490
'`PUN(`END`STR""""c`END`PUN)`END`PLN\n' +
2491+
'\n' +
2492+
' `END`COMREM an old-style comment`END`PLN\n' +
2493+
' REMOVE`END`PUN(`END`PLNnot_a_comment`END`PUN)`END`PLN\n' +
24882494
' `END`KWDEnd`END`PLN `END`KWDSub`END`PLN\n' +
24892495
'`END`KWDEnd`END`PLN `END`KWDModule`END`PLN\n' +
24902496
'\n' +

0 commit comments

Comments
 (0)