summaryrefslogtreecommitdiffstats
path: root/kate/data/coffee.xml
blob: dc0f1c54143b235a9e2664301b780f86193c41c6 (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">

<language name="CoffeeScript"
          version="1.5"
          kateversion="2.4"
          section="Scripts"
          extensions="Cakefile;*.coffee;*.coco"
          mimetype="text/x-coffeescript;application/x-coffeescript"
          indenter="python"
          casesensitive="1"
          author="Max Shawabkeh (max99x@gmail.com)"
          license="MIT">
  <highlighting>
    <!-- Built-in constants. -->
    <list name="value_keywords">
      <item>false</item>
      <item>true</item>
      <item>yes</item>
      <item>no</item>
      <item>on</item>
      <item>off</item>
      <item>undefined</item>
      <item>null</item>
      <item>NaN</item>
      <item>Infinity</item>
    </list>
    <!-- Generic keywords. -->
    <list name="keywords">
      <item>return</item>
      <item>break</item>
      <item>continue</item>
      <item>throw</item>
      <item>for</item>
      <item>while</item>
      <item>until</item>
      <item>loop</item>
      <item>if</item>
      <item>else</item>
      <item>unless</item>
      <item>switch</item>
      <item>when</item>
      <item>then</item>
      <item>and</item>
      <item>or</item>
      <item>in</item>
      <item>do</item>
      <item>of</item>
      <item>by</item>
      <item>is</item>
      <item>isnt</item>
      <item>not</item>
      <item>typeof</item>
      <item>delete</item>
      <item>where</item>
      <item>super</item>
      <item>try</item>
      <item>catch</item>
      <item>finally</item>
      <item>try</item>
      <item>catch</item>
      <item>finally</item>
      <item>constructor</item>
    </list>
    <!-- Keywords which are always followed by a class name. -->
    <list name="class_keywords">
      <item>class</item>
      <item>extends</item>
      <item>new</item>
      <item>instanceof</item>
    </list>
    <!-- Reserved words. -->
    <list name="reserved">
      <item>case</item>
      <item>default</item>
      <item>function</item>
      <item>var</item>
      <item>void</item>
      <item>with</item>
      <item>const</item>
      <item>let</item>
      <item>enum</item>
      <item>export</item>
      <item>import</item>
      <item>native</item>
      <item>__hasProp</item>
      <item>__extends</item>
      <item>__slice</item>
      <item>__bind</item>
      <item>__indexOf</item>
    </list>
    <!-- Built-in globals provided in most contexts. -->
    <list name="globals">
      <item>Object</item>
      <item>Number</item>
      <item>Boolean</item>
      <item>Array</item>
      <item>String</item>
      <item>RegExp</item>
      <item>Function</item>
      <item>Date</item>
      <item>Math</item>
      <item>eval</item>
      <item>setInterval</item>
      <item>clearInterval</item>
      <item>setTimeout</item>
      <item>clearTimeout</item>
      <item>isFinite</item>
      <item>isNaN</item>
      <item>parseFloat</item>
      <item>parseInt</item>
      <item>escape</item>
      <item>unescape</item>
      <item>console</item>
      <item>encodeURI</item>
      <item>encodeURIComponent</item>
      <item>decodeURI</item>
      <item>decodeURIComponent</item>
    </list>
    <!-- Built-in globals provided in browser context. -->
    <list name="browser_globals">
      <item>window</item>
      <item>document</item>
      <item>navigator</item>
      <item>location</item>
      <item>history</item>
      <item>screen</item>
      <item>alert</item>
      <item>prompt</item>
    </list>
    <!-- Built-in globals provided in Node.js context. -->
    <list name="nodejs_globals">
      <item>process</item>
      <item>GLOBAL</item>
      <item>require</item>
      <item>exports</item>
    </list>
    <!-- Context-sensitive highlighting rules. -->
    <contexts>
      <!-- Generic code. -->
      <context name="Normal" attribute="Normal" lineEndContext="#stay">
        <DetectSpaces/>
        <!-- Numbers. -->
        <Float attribute="Float" context="#stay"/>
        <Int attribute="Decimal" context="#stay"/>
        <HlCOct attribute="Oct" context="#stay"/>
        <HlCHex attribute="Hex" context="#stay"/>
        <!-- Keywords. -->
        <keyword attribute="Keyword" context="#stay" String="keywords"/>
        <keyword attribute="Keyword" context="Class" String="class_keywords"/>
        <keyword attribute="Value Keywords" context="#stay" String="value_keywords"/>
        <keyword attribute="Reserved" context="#stay" String="reserved"/>
        <!-- Globals. -->
        <keyword attribute="Globals" context="#stay" String="globals"/>
        <keyword attribute="Browser Globals" context="#stay" String="browser_globals"/>
        <keyword attribute="Node.js Globals" context="#stay" String="nodejs_globals"/>
        <!-- Member accessors. -->
        <RegExpr attribute="Accessor" context="#stay" String="(@[_$a-zA-Z][$\w]*|\bthis)\b" insensitive="false"/>
        <!-- Function definitions. Matches an optional argument list followed by a function arrow (normal or fat). -->
        <RegExpr attribute="Function" context="#stay" String="(\((\'[^']*'|&quot;[^&quot;]*&quot;|[^()])*\))?\s*(-|=)&gt;" insensitive="true"/>
        <!-- Generic identifiers. -->
        <RegExpr attribute="Identifier" context="#stay" String="[_$a-z][$\w]*\b" insensitive="true"/>
        <!-- Strings. -->
        <StringDetect attribute="String" context="Heredoc" String="'''" beginRegion="Heredoc"/>
        <StringDetect attribute="String" context="Rich Heredoc" String="&quot;&quot;&quot;" beginRegion="Rich Heredoc"/>
        <DetectChar attribute="String" context="String" char="'"/>
        <DetectChar attribute="String" context="Rich String" char="&quot;"/>
        <!-- Embedded JavaScript. -->
        <DetectChar attribute="Javascript" context="Javascript" char="`" beginRegion="Javascript"/>
        <!-- Comments. -->
        <StringDetect attribute="Comment" context="Multiline Comment" String="###" beginRegion="Comment"/>
        <DetectChar attribute="Comment" context="Comment" char="#"/>
        <!-- Regular expressions. -->
        <RegExpr attribute="Regex" context="Multiline Regex" String="///" beginRegion="Multiline Regex"/>
        <RegExpr attribute="Regex" context="#stay" String="/([^/\\\r\n]|\\.)*/[mig]{0,3}"/>
        <!-- Operators and other non-alphanumeric symbols. -->
        <AnyChar attribute="Symbol" context="#stay" String="():!%&amp;+,-/.*&lt;=&gt;?[]|~^&#59;{}"/>
      </context>
      <!-- Multiline regular expressions. -->
      <context name="Multiline Regex" attribute="Regex" lineEndContext="#stay" noIndentationBasedFolding="1">
        <HlCStringChar attribute="Regex" context="#stay"/>
        <DetectChar attribute="Comment" context="Comment" char="#"/>
        <RegExpr attribute="Regex" context="#pop" String="///[mig]{0,3}" endRegion="Multiline Regex"/>
      </context>
      <!-- Class names. -->
      <context name="Class" attribute="Normal" lineEndContext="#stay">
        <DetectSpaces/>
        <RegExpr attribute="Class" context="#pop" String="[@$:.\w\[\]]+"/>
      </context>
      <!-- Comments. -->
      <context name="Comment" attribute="Comment" lineEndContext="#pop">
        <IncludeRules context="##Alerts_indent"/>
      </context>
      <context name="Multiline Comment" attribute="Comment" lineEndContext="#stay" noIndentationBasedFolding="1">
        <StringDetect attribute="Comment" context="#pop" String="###" endRegion="Comment"/>
        <IncludeRules context="##Alerts_indent"/>
      </context>
      <!-- Single-line strings. -->
      <context name="String" attribute="String" lineEndContext="#stay">
        <HlCStringChar attribute="String" context="#stay"/>
        <DetectChar attribute="String" context="#pop" char="'"/>
      </context>
      <context name="Rich String" attribute="String" lineEndContext="#stay">
        <HlCStringChar attribute="String" context="#stay"/>
        <Detect2Chars attribute="Embedding" context="Embedding" char="#" char1="{"/>
        <DetectChar attribute="String" context="#pop" char="&quot;"/>
      </context>
      <!-- Multi-line strings. -->
      <context name="Heredoc" attribute="String" lineEndContext="#stay" noIndentationBasedFolding="1">
        <HlCStringChar attribute="String" context="#stay"/>
        <StringDetect attribute="String" context="#pop" String="'''" endRegion="Heredoc"/>
      </context>
      <context name="Rich Heredoc" attribute="String" lineEndContext="#stay" noIndentationBasedFolding="1">
        <HlCStringChar attribute="String" context="#stay"/>
        <Detect2Chars attribute="Embedding" context="Embedding" char="#" char1="{"/>
        <StringDetect attribute="String" context="#pop" String="&quot;&quot;&quot;" endRegion="Rich Heredoc"/>
      </context>
      <!-- Expressions embedded in strings. -->
      <context name="Embedding" attribute="Normal" lineEndContext="#stay">
        <DetectChar attribute="Embedding" context="#pop" char="}"/>
      </context>
      <!-- Embedded Javascript. -->
      <context name="Javascript" attribute="Javascript" lineEndContext="#stay" noIndentationBasedFolding="1">
        <DetectChar attribute="Javascript" context="#pop" char="`" endRegion="Javascript"/>
        <!-- NOTE: This hides errors where a backtick is embedded in a JS string. -->
        <IncludeRules context="Normal##JavaScript" includeAttrib="true"/>
      </context>
    </contexts>
    <!-- Style mappings. -->
    <itemDatas>
      <itemData name="Normal" defStyleNum="dsNormal" spellChecking="false"/>
      <itemData name="Identifier" defStyleNum="dsNormal" spellChecking="false"/>
      <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
      <itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/>
      <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
      <itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
      <itemData name="Oct" defStyleNum="dsBaseN" spellChecking="false"/>
      <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
      <itemData name="String" defStyleNum="dsString" spellChecking="false"/>
      <itemData name="Comment" defStyleNum="dsComment" spellChecking="true"/>
      <itemData name="Symbol" defStyleNum="dsKeyword" spellChecking="false"/>
      <itemData name="Embedding" defStyleNum="dsChar" spellChecking="false"/>
      <itemData name="Accessor" defStyleNum="dsDataType" spellChecking="false"/>
      <itemData name="Class" defStyleNum="dsDataType" spellChecking="false" bold="1"/>
      <itemData name="Javascript" defStyleNum="dsAlert" spellChecking="false" italic="1"/>
      <itemData name="Regex" defStyleNum="dsString" spellChecking="false"/>
      <itemData name="Reserved" defStyleNum="dsAlert" spellChecking="false"/>
      <itemData name="Value Keywords" defStyleNum="dsOthers" spellChecking="false"/>
      <itemData name="Globals" defStyleNum="dsOthers" spellChecking="false"/>
      <!-- Context-sensitive globals - not styled by default. -->
      <itemData name="Browser Globals" defStyleNum="dsNormal" spellChecking="false"/>
      <itemData name="Node.js Globals" defStyleNum="dsNormal" spellChecking="false"/>
    </itemDatas>
  </highlighting>
  <!-- Global settings. -->
  <general>
    <indentation mode="python"/>
    <folding indentationsensitive="1"/>
    <comments>
      <comment name="singleLine" start="#"/>
      <comment name="multiLine" start="###" end="###" region="Comment"/>
    </comments>
    <keywords casesensitive="1" additionalDeliminator="#'"/>
    <emptyLines>
      <emptyLine regexpr="(?:\s+|\s*#.*)"/>
    </emptyLines>
  </general>
</language>