Skip to content

Commit 459365e

Browse files
authored
Xojo: Added missing keywords (#2805)
1 parent 99a21dc commit 459365e

File tree

3 files changed

+102
-4
lines changed

3 files changed

+102
-4
lines changed

components/prism-xojo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Prism.languages.xojo = {
1414
/&[bchou][a-z\d]+/i
1515
],
1616
'symbol': /#(?:If|Else|ElseIf|Endif|Pragma)\b/i,
17-
'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|By(?:Ref|Val)|Break|Call|Case|Catch|Const|Continue|CurrentMethodName|Declare|Dim|Do(?:wnTo)?|Each|Else(?:If)?|End|Exit|Extends|False|Finally|For|Global|If|In|Lib|Loop|Me|Next|Nil|Optional|ParamArray|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select|Self|Soft|Static|Step|Super|Then|To|True|Try|Ubound|Until|Using|Wend|While)\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|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,
1818
'operator': /<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i,
1919
'punctuation': /[.,;:()]/
20-
};
20+
};

components/prism-xojo.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/languages/xojo/keyword_feature.test

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,71 @@ App
33
Array
44
As
55
Assigns
6+
Auto
7+
Boolean
68
ByRef
9+
Byte
710
ByVal
811
Break
912
Call
1013
Case
1114
Catch
15+
CFStringRef
16+
CGFloat
17+
Class
18+
Color
1219
Const
1320
Continue
21+
CString
22+
Currency
1423
CurrentMethodName
1524
Declare
25+
Delegate
1626
Dim
1727
Do
28+
Double
1829
DownTo
1930
Each
2031
Else
2132
ElseIf
2233
End
34+
Enumeration
35+
Event
36+
Exception
2337
Exit
2438
Extends
2539
False
2640
Finally
2741
For
42+
Function
43+
Get
44+
GetTypeInfo
2845
Global
46+
GOTO
2947
If
48+
Implements
3049
In
50+
Inherits
51+
Integer
52+
Interface
53+
Int8
54+
Int16
55+
Int32
56+
Int64
3157
Lib
3258
Loop
3359
Me
60+
Module
3461
Next
3562
Nil
63+
Object
3664
Optional
3765
ParamArray
66+
Private
67+
Property
68+
Protected
69+
PString
70+
Ptr
3871
Raise
3972
RaiseEvent
4073
ReDim
@@ -43,19 +76,35 @@ RemoveHandler
4376
Return
4477
Select
4578
Self
79+
Set
80+
Single
81+
Shared
82+
Short
4683
Soft
4784
Static
4885
Step
86+
String
87+
Sub
4988
Super
89+
Text
5090
Then
5191
To
5292
True
5393
Try
5494
Ubound
95+
UInteger
96+
UInt8
97+
UInt16
98+
UInt32
99+
UInt64
55100
Until
56101
Using
102+
Var
103+
Variant
57104
Wend
58105
While
106+
WindowPtr
107+
WString
59108

60109
----------------------------------------------------
61110

@@ -65,38 +114,71 @@ While
65114
["keyword", "Array"],
66115
["keyword", "As"],
67116
["keyword", "Assigns"],
117+
["keyword", "Auto"],
118+
["keyword", "Boolean"],
68119
["keyword", "ByRef"],
120+
["keyword", "Byte"],
69121
["keyword", "ByVal"],
70122
["keyword", "Break"],
71123
["keyword", "Call"],
72124
["keyword", "Case"],
73125
["keyword", "Catch"],
126+
["keyword", "CFStringRef"],
127+
["keyword", "CGFloat"],
128+
["keyword", "Class"],
129+
["keyword", "Color"],
74130
["keyword", "Const"],
75131
["keyword", "Continue"],
132+
["keyword", "CString"],
133+
["keyword", "Currency"],
76134
["keyword", "CurrentMethodName"],
77135
["keyword", "Declare"],
136+
["keyword", "Delegate"],
78137
["keyword", "Dim"],
79138
["keyword", "Do"],
139+
["keyword", "Double"],
80140
["keyword", "DownTo"],
81141
["keyword", "Each"],
82142
["keyword", "Else"],
83143
["keyword", "ElseIf"],
84144
["keyword", "End"],
145+
["keyword", "Enumeration"],
146+
["keyword", "Event"],
147+
["keyword", "Exception"],
85148
["keyword", "Exit"],
86149
["keyword", "Extends"],
87150
["keyword", "False"],
88151
["keyword", "Finally"],
89152
["keyword", "For"],
153+
["keyword", "Function"],
154+
["keyword", "Get"],
155+
["keyword", "GetTypeInfo"],
90156
["keyword", "Global"],
157+
["keyword", "GOTO"],
91158
["keyword", "If"],
159+
["keyword", "Implements"],
92160
["keyword", "In"],
161+
["keyword", "Inherits"],
162+
["keyword", "Integer"],
163+
["keyword", "Interface"],
164+
["keyword", "Int8"],
165+
["keyword", "Int16"],
166+
["keyword", "Int32"],
167+
["keyword", "Int64"],
93168
["keyword", "Lib"],
94169
["keyword", "Loop"],
95170
["keyword", "Me"],
171+
["keyword", "Module"],
96172
["keyword", "Next"],
97173
["keyword", "Nil"],
174+
["keyword", "Object"],
98175
["keyword", "Optional"],
99176
["keyword", "ParamArray"],
177+
["keyword", "Private"],
178+
["keyword", "Property"],
179+
["keyword", "Protected"],
180+
["keyword", "PString"],
181+
["keyword", "Ptr"],
100182
["keyword", "Raise"],
101183
["keyword", "RaiseEvent"],
102184
["keyword", "ReDim"],
@@ -105,19 +187,35 @@ While
105187
["keyword", "Return"],
106188
["keyword", "Select"],
107189
["keyword", "Self"],
190+
["keyword", "Set"],
191+
["keyword", "Single"],
192+
["keyword", "Shared"],
193+
["keyword", "Short"],
108194
["keyword", "Soft"],
109195
["keyword", "Static"],
110196
["keyword", "Step"],
197+
["keyword", "String"],
198+
["keyword", "Sub"],
111199
["keyword", "Super"],
200+
["keyword", "Text"],
112201
["keyword", "Then"],
113202
["keyword", "To"],
114203
["keyword", "True"],
115204
["keyword", "Try"],
116205
["keyword", "Ubound"],
206+
["keyword", "UInteger"],
207+
["keyword", "UInt8"],
208+
["keyword", "UInt16"],
209+
["keyword", "UInt32"],
210+
["keyword", "UInt64"],
117211
["keyword", "Until"],
118212
["keyword", "Using"],
213+
["keyword", "Var"],
214+
["keyword", "Variant"],
119215
["keyword", "Wend"],
120-
["keyword", "While"]
216+
["keyword", "While"],
217+
["keyword", "WindowPtr"],
218+
["keyword", "WString"]
121219
]
122220

123221
----------------------------------------------------

0 commit comments

Comments
 (0)