File: elixir.xml

package info (click to toggle)
kf6-syntax-highlighting 6.20.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 49,872 kB
  • sloc: xml: 205,656; cpp: 12,882; python: 3,055; sh: 965; perl: 814; ruby: 494; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; exp: 61; erlang: 54; sql: 51; java: 47; sed: 45; objc: 37; tcl: 36; awk: 31; asm: 30; fortran: 18; cs: 10
file content (527 lines) | stat: -rw-r--r-- 26,558 bytes parent folder | download | duplicates (2)
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language [
  <!ENTITY identifier "[a-z][a-zA-Z0-9_]*">
  <!ENTITY module "[A-Z][a-zA-Z0-9_]*">
]>
<!--
  Elixir syntax highlighting definition for Kate.

  Copyright (C) 2014  by Rubén Caro (ruben.caro.estevez@gmail.com)
  Copyright (C) 2016  by Boris Egorov (egorov@linux.com)
  Copyright (C) 2025  by Jade Pfeiffer (jade@pfeiffer.codes)

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General Public
  License as published by the Free Software Foundation; either
  version 2 of the License, or (at your option) any later version.
  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Library General Public License for more details.
  You should have received a copy of the GNU Library General Public
  License along with this library; if not, write to the
  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  Boston, MA  02110-1301, USA.
-->
<!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". -->
<language author="Rubén Caro (ruben.caro.estevez@gmail.com), Boris Egorov (egorov@linux.com), Jade Pfeiffer (jade@pfeiffer.codes)"
          extensions="*.ex;*.exs"
          indenter="elixir"
          kateversion="5.79"
          license="LGPLv2+"
          mimetype="text/x-elixir"
          name="Elixir"
          section="Sources"
          style="elixir"
          version="16"
          priority="2">
  <highlighting>
    <list name="control-flow">
      <item>catch</item>
      <item>cond</item>
      <item>else</item>
      <item>if</item>
      <item>raise</item>
      <item>reraise</item>
      <item>rescue</item>
      <item>throw</item>
      <item>try</item>
      <item>unless</item>
    </list>
    <list name="keywords">
      <item>case</item>
      <item>with</item>
      <item>for</item>
      <item>receive</item>
      <item>after</item>
      <item>quote</item>
      <item>unquote</item>
      <item>unquote_splicing</item>
      <item>super</item>
      <item>and</item>
      <item>not</item>
      <item>or</item>
      <item>when</item>
      <item>in</item>
    </list>
    <list name="atoms">
      <item>nil</item>
      <item>true</item>
      <item>false</item>
    </list>
    <list name="definitions">
      <item>defmodule</item>
      <item>defprotocol</item>
      <item>defimpl</item>
      <item>defrecord</item>
      <item>defstruct</item>
      <item>defexception</item>
      <item>defoverridable</item>
    </list>
    <list name="def-functions">
      <item>def</item>
      <item>defp</item>
      <item>defmacro</item>
      <item>defmacrop</item>
      <item>defguard</item>
      <item>defguardp</item>
      <item>defdelegate</item>
    </list>
    <list name="mixin-macros">
      <item>import</item>
      <item>require</item>
      <item>alias</item>
      <item>use</item>
    </list>
    <list name="special-forms">
      <item>__MODULE__</item>
      <item>__ENV__</item>
      <item>__DIR__</item>
      <item>__STACKTRACE__</item>
      <item>__CALLER__</item>
    </list>
    <list name="module-attributes">
      <item>after_compile</item>
      <item>after_verify</item>
      <item>before_compile</item>
      <item>behaviour</item>
      <item>callback</item>
      <item>compile</item>
      <item>deprecated</item>
      <item>dialyzer</item>
      <item>external_resource</item>
      <item>file</item>
      <item>impl</item>
      <item>nifs</item>
      <item>on_definition</item>
      <item>on_load</item>
      <item>vsn</item>
    </list>
    <list name="struct-attributes">
      <item>derive</item>
      <item>enforce_keys</item>
    </list>
    <list name="typespec-attributes">
      <item>type</item>
      <item>typep</item>
      <item>opaque</item>
      <item>spec</item>
      <item>callback</item>
      <item>macrocallback</item>
      <item>optional_callbacks</item>
    </list>
    <contexts>
      <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
        <!-- Lists -->
        <DetectChar char="[" beginRegion="list" attribute="Braces"/>
        <DetectChar char="]" endRegion="list" attribute="Braces"/>

        <!-- Maps, Structs and Tuples -->
        <DetectChar char="%" attribute="Braces" context="Map Or Struct"/>
        <DetectChar char="{" beginRegion="map_or_struct_or_tuple" attribute="Braces"/>
        <DetectChar char="}" endRegion="map_or_struct_or_tuple" attribute="Braces"/>

        <!-- Function calls and definitions -->
        <DetectChar char="(" beginRegion="parameters" attribute="Braces"/>
        <DetectChar char=")" endRegion="parameters" attribute="Braces"/>

        <!-- Defined words -->
        <keyword String="keywords" attribute="Keyword" context="#stay"/>
        <keyword String="control-flow" attribute="Control Flow" context="#stay"/>
        <keyword String="definitions" attribute="Definition" context="#stay"/>
        <keyword String="def-functions" attribute="Definition" context="Function Definition"/>
        <keyword String="atoms" attribute="Atom" context="#stay"/>
        <keyword String="mixin-macros" attribute="Mixin macros" context="#stay"/>
        <keyword String="special-forms" attribute="Built In" context="#stay"/>

        <!-- Numeric values. -->
        <DetectChar char="0" context="Numeric" lookAhead="true"/>
        <AnyChar String="123456789" context="Int" lookAhead="true"/>

        <DetectChar char="," attribute="Normal Text" context="#stay"/>
        <DetectChar char="?" context="CharacterLiteral" lookAhead="true"/>
        <IncludeRules context="Sigils"/>
        <Detect2Chars char=":" char1=":" attribute="Operator" context="#stay"/>
        <DetectChar char=":" attribute="Atom" context="AtomValue"/>

        <AnyChar String=".=+-*/\!^:|&amp;&lt;&gt;" context="Operators" lookAhead="true"/>
        <StringDetect String="&quot;&quot;&quot;" attribute="String" context="Heredoc"/>
        <DetectChar char="&quot;" attribute="String" context="Bitstring" lookAhead="true"/>
        <DetectChar char="'" attribute="Charlist" context="Charlist"/>
        <DetectChar char="#" attribute="Comment" context="Line Comment"/>
        <DetectChar char="@" context="Module Attribute" lookAhead="true"/>

        <!-- Identifiers -->
        <DetectChar char="_" context="Underscore" lookAhead="true"/>
        <!-- Generally a module or class name like "File", "MyModule_1", .. -->
        <RegExpr String="&module;" attribute="Module" context="#stay"/>
        <RegExpr String="(&identifier;[?!]?)" context="Identifier" lookAhead="true"/>
        <DetectSpaces/>
      </context>

      <context attribute="Normal Text" fallthroughContext="#pop" name="Map Or Struct">
        <DetectChar char="{" context="#pop" lookAhead="true"/>
        <keyword String="special-forms" attribute="Built In" context="#stay"/>
        <RegExpr String="_*&module;" attribute="Module" context="#stay"/>
      </context>

      <!-- Operators -->
      <context attribute="Operator" fallthroughContext="#pop" name="Operators">
        <Detect2Chars char="=" char1=">" attribute="Operator" context="#pop"/>
        <Detect2Chars char=":" char1=":" attribute="Operator" context="#pop"/>
        <AnyChar String="&lt;&gt;" context="Arrows" lookAhead="true"/>
        <StringDetect String="..." attribute="Operator" context="#pop"/>
        <Detect2Chars char="." char1="." attribute="Operator" context="#pop"/>
        <DetectChar char="." attribute="Normal Text" context="#pop"/>
        <AnyChar String="=+-*/\!^:|&amp;~" context="Atomable Operators" lookAhead="true"/>
      </context>
      <context attribute="Error" fallthroughContext="#pop" name="Atomable Operators">
        <Detect2Chars char="*" char1="*" context="#pop"/>
        <Detect2Chars char="=" char1="~" context="#pop"/>
        <Detect2Chars char="\" char1="\" context="#pop"/>
        <Detect2Chars char="|" char1="&gt;" context="#pop"/>
        <Detect2Chars char="-" char1="&gt;" context="#pop"/>
        <Detect2Chars char="&gt;" char1="=" context="#pop"/>
        <AnyChar String="*/^" context="#pop"/>
        <RegExpr String="([\+\-\=\|\!\&amp;])(?:\1\1?)?|&lt;(?:&lt;&lt;|~?&gt;|&lt;?~|[-=])?|(?:[~&gt;]&gt;&gt;|[~=]?&gt;)" context="#pop"/>
      </context>
      <context attribute="Operator" fallthroughContext="#pop!Atomable Operators" name="Arrows">
        <StringDetect String="&lt;&lt;&lt;" attribute="Operator" context="#pop"/>
        <StringDetect String="&gt;&gt;&gt;" attribute="Operator" context="#pop"/>
        <StringDetect String="&lt;&lt;" attribute="Braces" context="#pop" beginRegion="bitstring"/>
        <StringDetect String="&gt;&gt;" attribute="Braces" context="#pop" endRegion="bitstring"/>
      </context>

      <!-- Numeric Literals -->
      <context attribute="Integer" lineEndContext="#pop" fallthroughContext="#pop" name="Numeric">
        <Detect2Chars char="0" char1="b" attribute="Bin" context="#pop!Base Bin"/>
        <Detect2Chars char="0" char1="x" attribute="Hex" context="#pop!Base Hex"/>
        <Detect2Chars char="0" char1="o" attribute="Octal" context="#pop!Base Oct"/>
        <Detect2Chars char="0" char1="." attribute="Float" context="#pop!Float Point"/>
        <DetectChar char="0" attribute="Integer" context="#pop!Int" lookAhead="true"/>
      </context>
      <context attribute="Hex" lineEndContext="#pop" fallthroughContext="#pop" name="Base Hex">
        <AnyChar String="0123456789ABCDEFabcdef" context="#stay"/>
        <RegExpr String="_[\dA-F]+" insensitive="true" context="#stay"/>
      </context>
      <context attribute="Octal" lineEndContext="#pop" fallthroughContext="#pop" name="Base Oct">
        <AnyChar String="01234567" context="#stay"/>
        <RegExpr String="_[0-7]+" context="#stay"/>
      </context>
      <context attribute="Bin" lineEndContext="#pop" fallthroughContext="#pop" name="Base Bin">
        <AnyChar String="01" context="#stay"/>
        <Detect2Chars char="_" char1="1" context="#stay"/>
        <Detect2Chars char="_" char1="0" context="#stay"/>
      </context>

      <context attribute="Integer" lineEndContext="#pop" fallthroughContext="#pop" name="Int">
        <RegExpr String="\d+(_\d+)*\.[^\.]" attribute="Float" context="#pop!Float Point"/>
        <AnyChar String="0123456789" context="#stay"/>
        <RegExpr String="_\d+" context="#stay"/>
        <Detect2Chars char="." char1="." context="#pop!Operators"/>
        <DetectChar char="." context="#pop!Float Point"/>
      </context>
      <context attribute="Float" lineEndContext="#pop" fallthroughContext="#pop" name="Float Point">
        <AnyChar String="0123456789" context="#stay"/>
        <RegExpr String="_\d+" context="#stay"/>
        <Detect2Chars char="e" char1="-" context="#pop!Scientific Notation"/>
        <DetectChar char="e" context="#pop!Scientific Notation"/>
      </context>
      <context attribute="Float" lineEndContext="#pop" fallthroughContext="#pop" name="Scientific Notation">
        <AnyChar String="0123456789" context="#stay"/>
        <RegExpr String="_\d+" context="#stay"/>
      </context>

      <context attribute="Char Literal" fallthroughContext="#pop" name="CharacterLiteral">
        <RegExpr String="\?(\\\S|[^\s\\])" attribute="Char Literal" context="#pop"/>
        <Detect2Chars char="?" char1="\" attribute="Error" context="#pop"/>
      </context>

      <!-- Variables, Functions, Keywords -->
      <context attribute="Variable Underscore" name="Underscore">
        <RegExpr String="_*&identifier;[?!]?" attribute="Variable Underscore" context="#pop"/>
        <DetectChar char="_" attribute="Variable Underscore" context="#pop"/>
      </context>
      <context attribute="Variable" fallthroughContext="#pop" name="Identifier">
        <RegExpr String="(%1)\(" context="#pop!Function" lookAhead="true" dynamic="true"/>
        <RegExpr String="%1:(?!:)" attribute="Atom" context="#pop" dynamic="true"/>

        <!-- End terminated blocks -->
        <WordDetect String="do" attribute="Keyword" beginRegion="doend_block"/>
        <WordDetect String="fn" attribute="Keyword" beginRegion="doend_block"/>
        <WordDetect String="end" attribute="Keyword" endRegion="doend_block"/>

        <StringDetect String="%1" attribute="Variable" context="#pop" dynamic="true"/>
        <DetectSpaces lookAhead="true" context="#pop"/>
      </context>
      <context attribute="Function" fallthroughContext="#pop" name="Function">
        <StringDetect String="%1" attribute="Function" context="#pop" dynamic="true"/>
        <DetectChar char="(" context="#pop" beginRegion="parameters" attribute="Braces"/>
      </context>
      <context attribute="Function" fallthroughContext="#pop" name="Function Definition">
        <RegExpr String="_*&identifier;[?!]?" attribute="Function" context="#pop"/>
        <DetectSpaces attribute="Normal Text"/>
      </context>

      <context attribute="Attribute" lineEndContext="#pop" name="Module Attribute">
        <RegExpr String="(@(?:module|type)?doc)" context="#pop!Doc" lookAhead="true"/>
        <DetectChar char="@" attribute="Normal Text" context="#stay"/>
        <keyword String="module-attributes" attribute="Built In" context="#stay"/>
        <keyword String="struct-attributes" attribute="Built In" context="#stay"/>
        <keyword String="typespec-attributes" attribute="Built In" context="#stay"/>
        <RegExpr String="(&identifier;[?!]?)" attribute="Normal Text" context="#pop"/>
        <DetectSpaces context="#pop"/>
      </context>

      <!-- @moduledoc, @typedoc, and @doc -->
      <context attribute="Attribute" lineEndContext="#pop" fallthroughContext="#pop" name="Doc">
        <RegExpr String="%1 (?:~[Ss])?(&quot;(?:&quot;&quot;)?)" context="#pop!Doc Interp" beginRegion="doc_comment" dynamic="true"/>
        <StringDetect String="%1" context="#pop" dynamic="true"/>
      </context>
      <context attribute="DocComment" lineEndContext="#stay" name="Doc Interp">
        <StringDetect String="%1" attribute="DocComment" context="#pop" endRegion="doc_comment" dynamic="true"/>
        <IncludeRules context="Interpolated"/>
        <IncludeRules context="Markdown"/>
      </context>

      <!-- Atoms (keys: and :values) -->
      <context attribute="Atom" fallthroughContext="#pop!AtomOperator" name="AtomValue">
        <RegExpr String="(&quot;|')" attribute="Atom" context="#pop!Quoted Atom"/>
        <RegExpr String="(?:_|&identifier;)" attribute="Atom" context="#pop!AtomNodeName"/>
      </context>
      <context attribute="Atom" lineEndContext="#pop" fallthroughContext="#pop" name="AtomNodeName">
        <!-- Used for Node names -->
        <AnyChar String="!?" attribute="Atom" context="#pop"/>
        <RegExpr String="&identifier;|@[a-zA-Z0-9_]*(\.&identifier;)*" attribute="Atom" context="#stay"/>
      </context>
      <context attribute="Atom" lineEndContext="#pop" fallthroughContext="#pop" name="AtomOperator">
        <DetectChar char="@" attribute="Atom" context="#pop"/>
        <Detect2Chars char="{" char1="}" attribute="Atom" context="#pop"/>
        <StringDetect String="%{}" attribute="Atom" context="#pop"/>
        <StringDetect String="&lt;&lt;&gt;&gt;" attribute="Atom" context="#pop"/>
        <StringDetect String="..." attribute="Atom" context="#pop"/>
        <Detect2Chars char="." char1="." attribute="Atom" context="#pop"/>
        <DetectChar char="." attribute="Atom" context="#pop"/>
        <AnyChar String=".=+-*/\!^~:|&amp;&lt;&gt;" context="AtomValue Operator" lookAhead="true"/>
      </context>
      <context attribute="Error" fallthroughContext="#pop"  name="AtomValue Operator">
        <IncludeRules context="Atomable Operators"/>
      </context>
      <context attribute="Atom" lineEndContext="#stay" name="Quoted Atom">
        <StringDetect String="%1" attribute="Atom" context="#pop" dynamic="true"/>
        <IncludeRules context="Interpolated"/>
      </context>
      <context attribute="Atom" name="Atom Bitstring Key">
        <DetectChar char="&quot;" attribute="Atom" context="#pop!Atom Bitstring Key Body"/>
      </context>
      <context attribute="Atom" name="Atom Bitstring Key Body">
        <Detect2Chars char="&quot;" char1=":" attribute="Atom" context="#pop"/>
        <IncludeRules context="Interpolated"/>
      </context>

      <context attribute="DocComment" name="Markdown">
        <RegExpr String="^(\s*)#{1,7}\s" context="Markdown Header" column="0" lookAhead="true"/>
        <RegExpr String="^\s*([\+\-\*]|\d+\.)\s" attribute="MarkdownMark" column="0"/>
        <RegExpr String="`.+`" context="Markdown Code" minimal="true" lookAhead="true"/>
        <DetectSpaces/>
      </context>
      <context attribute="MarkdownHead" lineEndContext="#pop" name="Markdown Header">
        <StringDetect String="%1" attribute="Normal Text" dynamic="true"/>
        <DetectSpaces/>
      </context>
      <context attribute="Normal Text" name="Markdown Code">
        <DetectChar char="`" attribute="DocComment" context="#pop!Markdown Code Body"/>
      </context>
      <context attribute="Normal Text" lineEndContext="#pop" name="Markdown Code Body">
        <DetectChar char="`" context="#pop"/>
        <IncludeRules context="Normal"/>
      </context>

      <context attribute="String" lineEndContext="#stay" name="Heredoc">
        <StringDetect String="&quot;&quot;&quot;" attribute="String" context="#pop"/>
      </context>
      <context attribute="String" name="Bitstring">
        <!-- Atom keys can also have interpolatation if they are a "String" -->
        <RegExpr String="&quot;(?:\\.|#\{.+\}|[^&quot;])*&quot;:\s" attribute="Atom" context="#pop!Atom Bitstring Key" minimal="true" lookAhead="true"/>
        <DetectChar char="&quot;" attribute="String" context="#pop!Bitstring Body"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Bitstring Body">
        <DetectChar char="&quot;" attribute="String" context="#pop"/>
        <IncludeRules context="Interpolated"/>
      </context>
      <context attribute="Charlist" lineEndContext="#stay" name="Charlist">
        <DetectChar char="'" attribute="Charlist" context="#pop"/>
        <IncludeRules context="Interpolated"/>
      </context>

      <!-- Sigils -->
      <context attribute="String" name="Sigils">
        <StringDetect String="~H&quot;" context="Sigil HEEx" lookAhead="true"/>
        <RegExpr String="~(?:[a-z]|[A-Z][A-Z\d]*)[/|&quot;'\(\{\[\&lt;]" attribute="String" context="Sigil" lookAhead="true"/>
        <DetectChar char="~" attribute="Operator" context="Operators" lookAhead="true"/>
      </context>
      <context attribute="String" name="Sigil">
        <DetectChar char="~" attribute="String" context="#stay"/>
        <RegExpr String="[a-z]" attribute="String" context="#pop!Sigil Delimeter Interp"/>
        <RegExpr String="[A-Z]" attribute="String" context="#pop!Sigil Delimeter Raw"/>
      </context>

      <context attribute="String" name="Sigil HEEx">
        <DetectChar char="~" attribute="String" context="#stay" beginRegion="sigil_heex"/>
        <DetectChar char="H" attribute="String" context="#stay"/>
        <RegExpr String="(&quot;&quot;&quot;|[/|&quot;'])" attribute="String" context="#pop!Sigil Interp HEEx" beginRegion="sigil"/>
      </context>
      <context attribute="Normal Text" name="Sigil Interp HEEx">
        <StringDetect String="%1" attribute="String" context="#pop" dynamic="true"/>
        <IncludeRules context="Text##Elixir/HEEx"/>
      </context>

      <!-- Sigils, Interpolated -->
      <context attribute="String" name="Sigil Delimeter Interp">
        <DetectChar char="[" attribute="String" context="#pop!Sigil Interp Square" beginRegion="sigil"/>
        <DetectChar char="(" attribute="String" context="#pop!Sigil Interp Paren" beginRegion="sigil"/>
        <DetectChar char="{" attribute="String" context="#pop!Sigil Interp Curly" beginRegion="sigil"/>
        <DetectChar char="&lt;" attribute="String" context="#pop!Sigil Interp Angle" beginRegion="sigil"/>
        <RegExpr String="(&quot;&quot;&quot;|[/|&quot;'])" attribute="String" context="#pop!Sigil Interp Match" beginRegion="sigil"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Sigil Interp Square">
        <IncludeRules context="Sigil Square"/>
        <IncludeRules context="Interpolated"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Sigil Interp Paren">
        <IncludeRules context="Sigil Paren"/>
        <IncludeRules context="Interpolated"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Sigil Interp Curly">
        <IncludeRules context="Sigil Curly"/>
        <IncludeRules context="Interpolated"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Sigil Interp Angle">
        <IncludeRules context="Sigil Angle"/>
        <IncludeRules context="Interpolated"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Sigil Interp Match">
        <IncludeRules context="Sigil Match"/>
        <IncludeRules context="Interpolated"/>
      </context>

      <!-- Sigils, Non-Interpolated -->
      <context attribute="String" name="Sigil Delimeter Raw">
        <DetectChar char="[" attribute="String" context="#pop!Sigil Square" beginRegion="sigil"/>
        <DetectChar char="(" attribute="String" context="#pop!Sigil Paren" beginRegion="sigil"/>
        <DetectChar char="{" attribute="String" context="#pop!Sigil Curly" beginRegion="sigil"/>
        <DetectChar char="&lt;" attribute="String" context="#pop!Sigil Angle" beginRegion="sigil"/>
        <RegExpr String="(&quot;&quot;&quot;|[/|&quot;'])" attribute="String" context="#pop!Sigil Match" beginRegion="sigil"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Sigil Square">
        <DetectChar char="]" attribute="String" context="#pop!Sigil Delimeter Modifiers" endRegion="sigil"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Sigil Paren">
        <DetectChar char=")" attribute="String" context="#pop!Sigil Delimeter Modifiers" endRegion="sigil"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Sigil Curly">
        <DetectChar char="}" attribute="String" context="#pop!Sigil Delimeter Modifiers" endRegion="sigil"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Sigil Angle">
        <DetectChar char="&gt;" attribute="String" context="#pop!Sigil Delimeter Modifiers" endRegion="sigil"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Sigil Match">
        <StringDetect String="%1" attribute="String" context="#pop!Sigil Delimeter Modifiers" dynamic="true" endRegion="sigil"/>
      </context>

      <context attribute="Normal Text" fallthroughContext="#pop" lineEndContext="#pop" name="Sigil Delimeter Modifiers">
        <!-- Captures modifiers after delimeter -->
        <RegExpr String="[a-zA-Z]*" attribute="String" context="#pop"/>
      </context>

      <!-- Interpolatation format -->
      <context attribute="Interpolation" name="Interpolated">
        <!-- Escapes can only happen in the same context as Interpolated strings -->
        <DetectChar char="\" context="Escape Sequence" lookAhead="true"/>
        <Detect2Chars char="#" char1="{" attribute="Interpolation" context="Interp"/>
      </context>
      <!-- Interpolations can be nested -->
      <context attribute="Normal Text" lineEndContext="#stay" name="Interp">
        <DetectChar char="}" attribute="Interpolation" context="#pop"/>
        <!-- Highlight interpolation as code. -->
        <IncludeRules context="Normal"/>
      </context>
      <context attribute="Special Char" name="Escape Sequence">
        <RegExpr String="\\(?:.|x[\dA-F]{2}|u(?:[\dA-F]{4}|\{[\dA-F]+\}))" attribute="Special Char" insensitive="true" context="#pop"/>
      </context>

      <context attribute="Comment" lineEndContext="#pop" name="Line Comment">
        <DetectSpaces/>
        <IncludeRules context="##Comments"/>
      </context>

    </contexts>
    <itemDatas>
      <itemData defStyleNum="dsNormal"      name="Normal Text"/>
      <itemData defStyleNum="dsNormal"      name="Braces"/>
      <itemData defStyleNum="dsOperator"    name="Operator"/>
      <itemData defStyleNum="dsKeyword"     name="Keyword"/>
      <itemData defStyleNum="dsControlFlow" name="Control Flow"/>
      <itemData defStyleNum="dsKeyword"     name="Definition"/>
      <itemData defStyleNum="dsImport"      name="Mixin macros"/>
      <itemData defStyleNum="dsNormal"      name="Variable"/>
      <itemData defStyleNum="dsComment"     name="Variable Underscore"/>
      <itemData defStyleNum="dsNormal"      name="Module"/>
      <itemData defStyleNum="dsNormal"      name="Attribute"/>
      <itemData defStyleNum="dsBuiltIn"     name="Built In"/>
      <itemData defStyleNum="dsFunction"    name="Function"/>
      <itemData defStyleNum="dsVariable"    name="Atom"/>

      <!-- Literals -->
      <itemData defStyleNum="dsDecVal" name="Integer"/>
      <itemData defStyleNum="dsFloat"  name="Float"/>
      <itemData defStyleNum="dsBaseN"  name="Octal"/>
      <itemData defStyleNum="dsBaseN"  name="Hex"/>
      <itemData defStyleNum="dsBaseN"  name="Bin"/>

      <itemData defStyleNum="dsChar"   name="Char Literal"/>

      <itemData defStyleNum="dsString"         name="String" spellChecking="true"/>
      <itemData defStyleNum="dsVerbatimString" name="Charlist"/>
      <itemData defStyleNum="dsSpecialChar"    name="Special Char"/>
      <itemData defStyleNum="dsFunction"       name="Interpolation"/>

      <!-- Comments and Documentation -->
      <itemData defStyleNum="dsComment"       name="Comment"/>
      <itemData defStyleNum="dsDocumentation" name="DocComment"/>

      <itemData defStyleNum="dsDocumentation" name="MarkdownHead" bold="true" underline="true"/>
      <itemData defStyleNum="dsDocumentation" name="MarkdownMark" bold="true"/>

      <!-- use these to mark errors and alerts things -->
      <itemData defStyleNum="dsError" name="Error"/>
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment name="singleLine" start="#"/>
    </comments>
    <keywords casesensitive="1" weakDeliminator="!?:"/>
  </general>
</language>
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->