Skip to content

Commit ebbbfd4

Browse files
authored
Xojo: REM is no longer highlighted as a keyword in comments (#2823)
REM was incorrectly identified as a keyword. This has been fixed. REM is now recognized as a comment.
1 parent 7e51b99 commit ebbbfd4

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

components/prism-xojo.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
Prism.languages.xojo = {
22
'comment': {
3-
pattern: /(?:'|\/\/|Rem\b).+/i,
4-
inside: {
5-
'keyword': /^Rem/i
6-
}
3+
pattern: /(?:'|\/\/|Rem\b).+/i
74
},
85
'string': {
96
pattern: /"(?:""|[^"])*"/,
@@ -14,7 +11,7 @@ Prism.languages.xojo = {
1411
/&[bchou][a-z\d]+/i
1512
],
1613
'symbol': /#(?:If|Else|ElseIf|Endif|Pragma)\b/i,
17-
'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select(?:or)?|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,
14+
'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,
1815
'operator': /<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i,
1916
'punctuation': /[.,;:()]/
2017
};

components/prism-xojo.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/languages/xojo/comment_feature.test

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Rem Foobar
55
----------------------------------------------------
66

77
[
8-
["comment", ["' Foobar"]],
9-
["comment", ["// Foobar"]],
10-
["comment", [["keyword", "Rem"], " Foobar"]]
8+
["comment", "' Foobar"],
9+
["comment", "// Foobar"],
10+
["comment", "Rem Foobar"]
1111
]
1212

1313
----------------------------------------------------

tests/languages/xojo/keyword_feature.test

-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ Ptr
7171
Raise
7272
RaiseEvent
7373
ReDim
74-
Rem
7574
RemoveHandler
7675
Return
7776
Select
@@ -183,7 +182,6 @@ WString
183182
["keyword", "Raise"],
184183
["keyword", "RaiseEvent"],
185184
["keyword", "ReDim"],
186-
["keyword", "Rem"],
187185
["keyword", "RemoveHandler"],
188186
["keyword", "Return"],
189187
["keyword", "Select"],

0 commit comments

Comments
 (0)