File: elixir.xml

package info (click to toggle)
haskell-skylighting-core 0.14.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,440 kB
  • sloc: xml: 118,808; haskell: 3,117; cs: 72; ada: 67; java: 37; ansic: 32; cpp: 31; php: 25; tcl: 19; lisp: 14; perl: 11; makefile: 5
file content (239 lines) | stat: -rw-r--r-- 11,656 bytes parent folder | download
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language [
  <!ENTITY symbols "(?:@{1,2}|\$)?[a-zA-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)

  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)"
          extensions="*.ex;*.exs;*.eex;*.xml.eex;*.js.eex;*.heex"
          indenter="elixir"
          kateversion="5.79"
          license="LGPLv2+"
          mimetype="text/x-elixir"
          name="Elixir"
          section="Sources"
          style="elixir"
          version="15"
          priority="2">
  <highlighting>
    <list name="control-flow">
      <item>catch</item>
      <item>cond</item>
      <item>else</item>
      <item>if</item>
      <item>raise</item>
      <item>rescue</item>
      <item>throw</item>
      <item>try</item>
      <item>unless</item>
    </list>
    <list name="keywords">
      <item>case</item>
      <item>bc</item>
      <item>lc</item>
      <item>for</item>
      <item>receive</item>
      <item>exit</item>
      <item>after</item>
      <item>quote</item>
      <item>unquote</item>
      <item>super</item>
      <item>and</item>
      <item>not</item>
      <item>or</item>
      <item>when</item>
      <item>xor</item>
      <item>in</item>
      <item>inlist</item>
      <item>inbits</item>
    </list>
    <list name="pseudo-variables">
      <item>nil</item>
      <item>true</item>
      <item>false</item>
    </list>
    <list name="definitions">
      <item>defmodule</item>
      <item>def</item>
      <item>defp</item>
      <item>defprotocol</item>
      <item>defimpl</item>
      <item>defrecord</item>
      <item>defstruct</item>
      <item>defmacro</item>
      <item>defmacrop</item>
      <item>defdelegate</item>
      <item>defcallback</item>
      <item>defmacrocallback</item>
      <item>defexception</item>
      <item>defoverridable</item>
    </list>
    <list name="mixin-macros">
      <item>import</item>
      <item>require</item>
      <item>alias</item>
      <item>use</item>
    </list>
    <contexts>
      <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
        <!-- "shebang" line -->
        <RegExpr String="^#!\/.*" attribute="Keyword" column="0" context="#stay"/>

        <!-- End terminated blocks -->
        <!-- can be started by do or fn, but not by do: -->
        <RegExpr String="\bdo\b(?!:)" attribute="Keyword" beginRegion="doend_block"/>
        <WordDetect String="fn" attribute="Keyword" beginRegion="doend_block"/>
        <WordDetect String="end" attribute="Keyword" endRegion="doend_block"/>

        <!-- Lists -->
        <DetectChar char="[" beginRegion="list" attribute="Separator Array"/>
        <DetectChar char="]" endRegion="list" attribute="Separator Array"/>

        <!-- Maps and Structs and tuples -->
        <DetectChar char="{" beginRegion="map_or_struct_or_tuple" attribute="Separator Pair"/>
        <DetectChar char="}" endRegion="map_or_struct_or_tuple" attribute="Separator Pair"/>

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


        <!-- 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="pseudo-variables" attribute="Pseudo variable" context="#stay"/>
        <keyword String="mixin-macros" attribute="Mixin macros" context="#stay"/>

        <!-- special-character globals -->
        <RegExpr String="\b[_A-Z]+[A-Z_0-9]+\b" attribute="Global Constant" context="#stay"/>

        <!-- Generally a module or class name like "File", "MyModule_1", .. -->
        <RegExpr String="\b[A-Z]+_*(?:[0-9]|[a-z])[_a-zA-Z0-9]*\b" attribute="Constant" context="#stay"/>

        <!-- Numeric values. Note that we have to allow underscores between two digits (thus the creepy regular expressions). -->
        <RegExpr String="\b\-?0[xX](?:[0-9a-fA-F]|_[0-9a-fA-F])+" attribute="Hex" context="#stay"/>
        <RegExpr String="\b\-?0[bB](?:[01]|_[01])+" attribute="Bin" context="#stay"/>
        <RegExpr String="\b\-?0[1-7](?:[0-7]|_[0-7])*" attribute="Octal" context="#stay"/>
        <RegExpr String="\b\-?[0-9](?:[0-9]|_[0-9])*\.[0-9](?:[0-9]|_[0-9])*(?:[eE]\-?[1-9](?:[0-9]|_[0-9])*(?:\.[0-9]*)?)?" attribute="Float" context="#stay"/>
        <RegExpr String="\b\-?[1-9](?:[0-9]|_[0-9])*\b" attribute="Dec" context="#stay"/>
        <Int attribute="Dec" context="#stay"/>
        <HlCChar attribute="Char" context="#stay"/>
        <DetectChar attribute="Operator" char="." context="#stay"/>
        <Detect2Chars attribute="Operator" char="&amp;" char1="&amp;" context="#stay"/>
        <Detect2Chars attribute="Operator" char="|" char1="|" context="#stay"/>
        <!-- \s!|/=\s is regexp hack -->
        <RegExpr String="\s[\?\:\%]\s|[|&amp;&lt;&gt;\^\+*~\-=/]+|\s!|/=\s" attribute="Operator" context="#stay"/>
        <Detect2Chars char="%" char1="=" attribute="Operator" context="#stay"/>
        <RegExpr String=":&symbols;|\b&symbols;:|:\[\]=?" attribute="Symbol" context="#stay"/>
        <RegExpr String="@(?:module)?doc\s+&quot;&quot;&quot;" attribute="Attribute" context="Documentation"/>
        <StringDetect String="&quot;&quot;&quot;" attribute="String" context="Triple Quoted String"/>
        <DetectChar attribute="String" char="&quot;" context="Quoted String"/>
        <DetectChar attribute="Raw String" char="'" context="Apostrophed String"/>
        <Detect2Chars char="?" char1="#" attribute="Normal Text" context="#stay"/>
        <DetectChar attribute="Comment" char="#" context="General Comment"/>
        <RegExpr String="@[a-zA-Z_0-9]+" attribute="Attribute" context="#stay"/>
        <!-- handle the different regular expression formats -->
        <DetectIdentifier attribute="Normal Text" context="#stay"/>
      </context>
      <context attribute="DocComment" lineEndContext="#stay" name="Documentation">
        <StringDetect String="&quot;&quot;&quot;" attribute="Attribute" context="#pop"/>
        <RegExpr attribute="MarkdownHead" String="^\s*#+\s.*[#]?$" column="0"/>
        <RegExpr attribute="MarkdownBullet" String="^\s*[\*\+\-]\s" column="0"/>
        <RegExpr attribute="MarkdownNumlist" String="^\s*[\d]+\.\s" column="0"/>
        <RegExpr attribute="MarkdownCode" context="Markdown Code" String="^\s*\`\`\`\s*$" column="0"/>
        <DetectSpaces />
        <IncludeRules context="Normal Text##Markdown"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Triple Quoted String">
        <StringDetect String="&quot;&quot;&quot;" attribute="String" context="#pop"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="Quoted String">
        <Detect2Chars char="\" char1="\" attribute="String" context="#stay"/>
        <Detect2Chars char="\" char1="&quot;" attribute="String" context="#stay"/>
        <RegExpr String="#@{1,2}" attribute="Substitution" context="Short Subst"/>
        <Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>
        <DetectChar attribute="String" char="&quot;" context="#pop"/>
      </context>
      <context attribute="Raw String" lineEndContext="#stay" name="Apostrophed String">
        <Detect2Chars char="\" char1="\" attribute="String" context="#stay"/>
        <Detect2Chars char="\" char1="'" attribute="String" context="#stay"/>
        <DetectChar attribute="Raw String" char="'" context="#pop"/>
      </context>
      <!-- Substitutions can be nested -->
      <context attribute="Normal Text" lineEndContext="#stay" name="Subst">
        <DetectChar attribute="Substitution" char="}" context="#pop"/>
        <!-- Highlight substitution as code. -->
        <IncludeRules context="Normal"/>
      </context>
      <context attribute="Substitution" lineEndContext="#pop" name="Short Subst">
        <!-- Check for e.g.: "#@var#@@xy" -->
        <RegExpr String="#@{1,2}" attribute="Substitution" context="#stay"/>
        <RegExpr String="\w(?!\w)" attribute="Substitution" context="#pop"/>
      </context>
      <context attribute="Comment" lineEndContext="#pop" name="General Comment">
        <DetectSpaces />
        <IncludeRules context="##Comments"/>
      </context>
      <context attribute="MarkdownCode" lineEndContext="#stay" name="Markdown Code">
        <RegExpr String="^\s*```\s*$" attribute="MarkdownCode" context="#pop" column="0"/>
      </context>
    </contexts>
    <itemDatas>
      <itemData name="Global Constant" defStyleNum="dsConstant"/>
      <itemData name="Constant" defStyleNum="dsConstant"/>
      <itemData defStyleNum="dsNormal" name="Normal Text"/>
      <itemData defStyleNum="dsKeyword" name="Keyword"/>
      <itemData defStyleNum="dsControlFlow" name="Control Flow"/>
      <itemData defStyleNum="dsKeyword" name="Definition"/>
      <itemData defStyleNum="dsImport" name="Mixin macros"/>
      <itemData defStyleNum="dsConstant" name="Pseudo variable"/>
      <itemData defStyleNum="dsDecVal" name="Dec"/>
      <itemData defStyleNum="dsFloat" name="Float"/>
      <itemData defStyleNum="dsChar" name="Char"/>
      <itemData defStyleNum="dsBaseN" name="Octal"/>
      <itemData defStyleNum="dsBaseN" name="Hex"/>
      <itemData defStyleNum="dsBaseN" name="Bin"/>
      <itemData defStyleNum="dsVariable" name="Symbol"/>
      <itemData defStyleNum="dsString" name="String"/>
      <itemData defStyleNum="dsVerbatimString" name="Raw String"/>
      <itemData defStyleNum="dsOthers" name="Substitution"/>
      <itemData defStyleNum="dsOthers" name="Attribute"/>
      <itemData defStyleNum="dsComment" name="Comment"/>
      <itemData defStyleNum="dsComment" name="DocComment"/>
      <itemData defStyleNum="dsFunction" name="Separator Pair"/>
      <itemData defStyleNum="dsOthers" name="Separator Array"/>
      <!-- use these to mark errors and alerts things -->
      <itemData defStyleNum="dsOperator" name="Operator"/>
      <itemData name="MarkdownHead" defStyleNum="dsFunction" bold="true"/>
      <itemData name="MarkdownBullet" defStyleNum="dsFunction"/>
      <itemData name="MarkdownNumlist" defStyleNum="dsFunction"/>
      <itemData name="MarkdownCode" defStyleNum="dsFunction"/>
    </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; -->