-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathZScript.xml
258 lines (256 loc) · 11.7 KB
/
ZScript.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<?xml version="1.0" encoding="UTF-8"?>
<language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ZScript.xsd" name="ZScript" version="2" kateversion="5.74" section="Sources" extensions="*.zs;*.zcs" mimetype="text/ZScript" license="MIT" author="Micila "Kaptain" Micillotto" indenter="cstyle">
<highlighting>
<!-- List for all standard keywords -->
<list name="Standard">
<item>action</item>
<item>clearscope</item>
<item>deprecated</item>
<item>final</item>
<item>native</item>
<item>override</item>
<item>play</item>
<item>private</item>
<item>protected</item>
<item>static</item>
<item>ui</item>
<item>vararg</item>
<item>virtual</item>
<item>virtualscope</item>
<item>abstract</item>
<item>replaces</item>
<item>readonly</item>
<item>extend</item>
<item>let</item>
<item>const</item>
</list>
<!-- List for all types -->
<list name="Types">
<item>int</item>
<item>uint</item>
<item>int8</item>
<item>uint8</item>
<item>int16</item>
<item>uint16</item>
<item>byte</item>
<item>sbyte</item>
<item>short</item>
<item>ushort</item>
<item>float</item>
<item>float32</item>
<item>float64</item>
<item>double</item>
<item>string</item>
<item>name</item>
<item>color</item>
<item>vector2</item>
<item>vector3</item>
<item>array</item>
<item>map</item>
<item>actor</item>
<item>bool</item>
<item>sound</item>
<item>spriteid</item>
<item>state</item>
<item>statelabel</item>
<item>textureid</item>
<item>void</item>
<item>voidptr</item>
<item>meta</item>
<item>internal</item>
<item>latent</item>
<item>transient</item>
<item>class</item>
<item>struct</item>
<item>enum</item>
<item>self</item>
</list>
<!-- List for all "directives". -->
<list name="Directives">
<item>version</item>
</list>
<!-- List of elements used for control flows -->
<list name="ControlFlow">
<item>if</item>
<item>else</item>
<item>for</item>
<item>return</item>
<item>do</item>
<item>while</item>
<item>switch</item>
<item>continue</item>
<item>break</item>
<item>case</item>
</list>
<!--List of operators that are NOT single signs but actual words.
These aren't rendered in a different way from the normal text in the default KDE theme.
To do so, go to "Settings->Configure Kate*->Editor Component->Fonts & Colours->Highlighting text styles"
* This part can be skipped using the standard keybind Ctrl+Shift+,-->
<list name="Operators">
<item>alignof</item>
<item>sizeof</item>
<item>cross</item>
<item>dot</item>
<item>is</item>
</list>
<!-- The extra control flows in "states" blocks -->
<list name="StateControlFlow">
<item>loop</item>
<item>stop</item>
<item>wait</item>
<item>fail</item>
<item>goto</item>
</list>
<!-- The avaible states in the "states" blocks -->
<list name="States">
<item>spawn</item>
<item>idle</item>
<item>see</item>
<item>melee</item>
<item>missile</item>
<item>pain</item>
<item>death</item>
<item>death.sky</item>
<item>death.extreme</item>
<item>xdeath</item>
<item>death.fire</item>
<item>burn</item>
<item>death.ice</item>
<item>ice</item>
<item>death.disintegrate</item>
<item>disintegrate</item>
<item>raise</item>
<item>heal</item>
<item>crash</item>
<item>crash.extreme</item>
<item>crush</item>
<item>wound</item>
<item>greetings</item>
<item>yes</item>
<item>no</item>
<item>active</item>
<item>inactive</item>
<item>bounce</item>
</list>
<!-- The extra keywords for the "state" blocks -->
<list name="StateKeywords">
<item>bright</item>
<item>canraise</item>
<item>fast</item>
<item>light</item>
<item>nodelay</item>
<item>offset</item>
<item>slow</item>
</list>
<!-- List of contextes -->
<contexts>
<context attribute="Normal" lineEndContext="#pop" name="Normal">
<DetectSpaces />
<keyword attribute="Keyword" context="#stay" String="Standard" />
<Float attribute="Integer" context="#stay" />
<Int attribute="Integer" context="#stay" />
<keyword attribute="Type" context="#stay" String="Types" />
<keyword attribute="Directive" context="#stay" String="Directives" />
<keyword attribute="ControlFlow" context="#stay" String="ControlFlow" />
<keyword attribute="Operator" context="#stay" String="Operators" />
<DetectChar attribute="String" context="string" char=""" />
<DetectChar attribute="Un-Eascaped-String" context="uestring" char="'" />
<Detect2Chars attribute="Comment" context="comment" char="/" char1="/" />
<Detect2Chars attribute="Comment" context="Multi-line Comment" char="/" char1="*" beginRegion="RegionComment" />
<DetectChar attribute="Import" context="import" char="#" />
<RegExpr attribute="Function" context="#stay" String="(?:\w+?(?=\s*?\())" />
<!-- Lines for "states" and "default" blocks, used for actor classes -->
<!-- These have a different syntax from the rest, so they need both different contextes, like they're different languages. -->
<StringDetect attribute="Directive" context="#pop!initiatedefaultblock" String="default" insensitive="true" />
<StringDetect attribute="Directive" context="#pop!initiatestatesblock" String="states" insensitive="true" />
</context>
<!-- List of "inner" contextes -->
<!-- Strings -->
<context name="string" attribute="String" lineEndContext="#stay">
<DetectChar attribute="String" context="#pop" char=""" />
</context>
<!-- Strings without escaping -->
<context name="uestring" attribute="Un-Eascaped-String" lineEndContext="#stay">
<DetectChar attribute="Un-Eascaped-String" context="#pop" char="'" />
</context>
<!-- Comments -->
<context name="comment" attribute="Comment" lineEndContext="#pop">
<Detect2Chars attribute="Comment" context="#stay" char="/" char1="/" />
</context>
<!-- Multiple line comments -->
<context name="Multi-line Comment" attribute="Comment" lineEndContext="#stay">
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="RegionComment" />
</context>
<!-- Import statemens -->
<context name="import" attribute="Import" lineEndContext="#pop">
<DetectChar attribute="Import" context="#pop" char=" " />
</context>
<!-- Default block contextes -->
<!-- Initiation -->
<context name="initiatedefaultblock" attribute="Normal" lineEndContext="#stay">
<RegExpr String="[^{\s]" context="#pop" />
<DetectChar attribute="Normal" context="#pop!defaultblock" char="{" />
</context>
<!-- Syntaxt -->
<context name="defaultblock" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Normal" context="#pop" char="}" />
<DetectChar attribute="Normal" context="attribute" char="+" />
<DetectChar attribute="String" context="string" char=""" />
<Float attribute="Integer" context="#stay" />
<Int attribute="Integer" context="#stay" />
</context>
<!-- Attributes -->
<context name="attribute" attribute="Attribute" lineEndContext="#pop">
<DetectChar attribute="Attribute" context="#pop" char=" " />
</context>
<!-- States block contextes -->
<!-- Initiation -->
<context name="initiatestatesblock" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Normal" context="#pop!statesblock" char="{" />
<RegExpr String="[^{\s]" context="#pop" />
</context>
<!-- Syntax -->
<context name="statesblock" attribute="StatesBlock" lineEndContext="#stay">
<DetectChar attribute="Normal" context="#pop" char="}" />
<DetectChar attribute="String" context="string" char=""" />
<keyword attribute="ControlFlow" context="#stay" String="ControlFlow" />
<keyword attribute="ControlFlow" context="#stay" String="StateControlFlow" />
<keyword attribute="State" context="#stay" String="States" />
<keyword attribute="Keyword" context="#stay" String="StateKeywords" />
<RegExpr attribute="Function" context="#stay" String="(?:\w+?(?=\s*?\())" />
<RegExpr attribute="Function" context="#stay" String="(?:A_(?<=A_)\S*?(?=;))" />
<Float attribute="Integer" context="#stay" />
<Int attribute="Integer" context="#stay" />
</context>
</contexts>
<!-- List of the itemDatas (the ones that give the elements colours) -->
<itemDatas>
<itemData name="Normal" defStyleNum="dsNormal" />
<itemData name="Keyword" defStyleNum="dsKeyword" />
<itemData name="String" defStyleNum="dsString" />
<itemData name="Un-Eascaped-String" defStyleNum="dsVerbatimString" />
<itemData name="Comment" defStyleNum="dsComment" />
<itemData name="Import" defStyleNum="dsImport" />
<itemData name="Type" defStyleNum="dsDataType" />
<itemData name="Directive" defStyleNum="dsExtension" />
<itemData name="ControlFlow" defStyleNum="dsControlFlow" />
<itemData name="Operator" defStyleNum="dsOperator" />
<itemData name="Function" defStyleNum="dsFunction" />
<itemData name="Attribute" defStyleNum="dsAttribute" />
<itemData name="State" defStyleNum="dsDataType" />
<itemData name="Integer" defStyleNum="dsDecVal" />
<itemData name="Float" defStyleNum="dsFloat" />
</itemDatas>
</highlighting>
<!-- Syntax configuration -->
<general>
<!-- Quick comment (Ctrl + /) configuration -->
<comments>
<comment name="singleLine" start="//" />
<comment name="multiLine" start="/*" end="*/" />
</comments>
<!-- Keywords are case sensitive -->
<keywords casesensitive="0" />
<folding indentationsensitive="1" />
</general>
</language>