corrade-nucleus-nucleons – Blame information for rev 20

Subversion Repositories:
Rev:
Rev Author Line No. Line
20 office 1 ace.define("ace/mode/kotlin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
2 "use strict";
3  
4 var oop = require("../lib/oop");
5 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
6  
7 var KotlinHighlightRules = function() {
8  
9 this.$rules = {
10 start: [{
11 include: "#comments"
12 }, {
13 token: [
14 "text",
15 "keyword.other.kotlin",
16 "text",
17 "entity.name.package.kotlin",
18 "text"
19 ],
20 regex: /^(\s*)(package)\b(?:(\s*)([^ ;$]+)(\s*))?/
21 }, {
22 include: "#imports"
23 }, {
24 include: "#statements"
25 }],
26 "#classes": [{
27 token: "text",
28 regex: /(?=\s*(?:companion|class|object|interface))/,
29 push: [{
30 token: "text",
31 regex: /}|(?=$)/,
32 next: "pop"
33 }, {
34 token: ["keyword.other.kotlin", "text"],
35 regex: /\b((?:companion\s*)?)(class|object|interface)\b/,
36 push: [{
37 token: "text",
38 regex: /(?=<|{|\(|:)/,
39 <|{|\(|:)/ next: "pop"
40 <|{|\(|:)/ }, {
41 <|{|\(|:)/ token: "keyword.other.kotlin",
42 <|{|\(|:)/ regex: /\bobject\b/
43 <|{|\(|:)/ }, {
44 <|{|\(|:)/ token: "entity.name.type.class.kotlin",
45 <|{|\(|:)/ regex: /\w+/
46 <|{|\(|:)/ }]
47 <|{|\(|:)/ }, {
48 <|{|\(|:)/ token: "text",
49 <|{|\(|:)/ regex: /,
50 <|{|\(|:)/ push: [{
51 <|{|\(|:)/ token: "text",
52 <|{|\(|:)/ regex: />/,
53 <|{|\(|:)/ next: "pop"
54 <|{|\(|:)/ }, {
55 <|{|\(|:)/ include: "#generics"
56 <|{|\(|:)/ }]
57 <|{|\(|:)/ }, {
58 <|{|\(|:)/ token: "text",
59 <|{|\(|:)/ regex: /\(/,
60 <|{|\(|:)/ push: [{
61 <|{|\(|:)/ token: "text",
62 <|{|\(|:)/ regex: /\)/,
63 <|{|\(|:)/ next: "pop"
64 <|{|\(|:)/ }, {
65 <|{|\(|:)/ include: "#parameters"
66 <|{|\(|:)/ }]
67 <|{|\(|:)/ }, {
68 <|{|\(|:)/ token: "keyword.operator.declaration.kotlin",
69 <|{|\(|:)/ regex: /:/,
70 <|{|\(|:)/ push: [{
71 <|{|\(|:)/ token: "text",
72 <|{|\(|:)/ regex: /(?={|$)/,
73 <|{|\(|:)/ next: "pop"
74 <|{|\(|:)/ }, {
75 <|{|\(|:)/ token: "entity.other.inherited-class.kotlin",
76 <|{|\(|:)/ regex: /\w+/
77 <|{|\(|:)/ }, {
78 <|{|\(|:)/ token: "text",
79 <|{|\(|:)/ regex: /\(/,
80 <|{|\(|:)/ push: [{
81 <|{|\(|:)/ token: "text",
82 <|{|\(|:)/ regex: /\)/,
83 <|{|\(|:)/ next: "pop"
84 <|{|\(|:)/ }, {
85 <|{|\(|:)/ include: "#expressions"
86 <|{|\(|:)/ }]
87 <|{|\(|:)/ }]
88 <|{|\(|:)/ }, {
89 <|{|\(|:)/ token: "text",
90 <|{|\(|:)/ regex: /\{/,
91 <|{|\(|:)/ push: [{
92 <|{|\(|:)/ token: "text",
93 <|{|\(|:)/ regex: /\}/,
94 <|{|\(|:)/ next: "pop"
95 <|{|\(|:)/ }, {
96 <|{|\(|:)/ include: "#statements"
97 <|{|\(|:)/ }]
98 <|{|\(|:)/ }]
99 <|{|\(|:)/ }],
100 <|{|\(|:)/ "#comments": [{
101 <|{|\(|:)/ token: "punctuation.definition.comment.kotlin",
102 <|{|\(|:)/ regex: /\/\*/,
103 <|{|\(|:)/ push: [{
104 <|{|\(|:)/ token: "punctuation.definition.comment.kotlin",
105 <|{|\(|:)/ regex: /\*\//,
106 <|{|\(|:)/ next: "pop"
107 <|{|\(|:)/ }, {
108 <|{|\(|:)/ defaultToken: "comment.block.kotlin"
109 <|{|\(|:)/ }]
110 <|{|\(|:)/ }, {
111 <|{|\(|:)/ token: [
112 <|{|\(|:)/ "text",
113 <|{|\(|:)/ "punctuation.definition.comment.kotlin",
114 <|{|\(|:)/ "comment.line.double-slash.kotlin"
115 <|{|\(|:)/ ],
116 <|{|\(|:)/ regex: /(\s*)(\/\/)(.*$)/
117 <|{|\(|:)/ }],
118 <|{|\(|:)/ "#constants": [{
119 <|{|\(|:)/ token: "constant.language.kotlin",
120 <|{|\(|:)/ regex: /\b(?:true|false|null|this|super)\b/
121 <|{|\(|:)/ }, {
122 <|{|\(|:)/ token: "constant.numeric.kotlin",
123 <|{|\(|:)/ regex: /\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\b/
124 <|{|\(|:)/ }, {
125 <|{|\(|:)/ token: "constant.other.kotlin",
126 <|{|\(|:)/ regex: /\b[A-Z][A-Z0-9_]+\b/
127 <|{|\(|:)/ }],
128 <|{|\(|:)/ "#expressions": [{
129 <|{|\(|:)/ token: "text",
130 <|{|\(|:)/ regex: /\(/,
131 <|{|\(|:)/ push: [{
132 <|{|\(|:)/ token: "text",
133 <|{|\(|:)/ regex: /\)/,
134 <|{|\(|:)/ next: "pop"
135 <|{|\(|:)/ }, {
136 <|{|\(|:)/ include: "#expressions"
137 <|{|\(|:)/ }]
138 <|{|\(|:)/ }, {
139 <|{|\(|:)/ include: "#types"
140 <|{|\(|:)/ }, {
141 <|{|\(|:)/ include: "#strings"
142 <|{|\(|:)/ }, {
143 <|{|\(|:)/ include: "#constants"
144 <|{|\(|:)/ }, {
145 <|{|\(|:)/ include: "#comments"
146 <|{|\(|:)/ }, {
147 <|{|\(|:)/ include: "#keywords"
148 <|{|\(|:)/ }],
149 <|{|\(|:)/ "#functions": [{
150 <|{|\(|:)/ token: "text",
151 <|{|\(|:)/ regex: /(?=\s*fun)/,
152 <|{|\(|:)/ push: [{
153 <|{|\(|:)/ token: "text",
154 <|{|\(|:)/ regex: /}|(?=$)/,
155 <|{|\(|:)/ next: "pop"
156 <|{|\(|:)/ }, {
157 <|{|\(|:)/ token: "keyword.other.kotlin",
158 <|{|\(|:)/ regex: /\bfun\b/,
159 <|{|\(|:)/ push: [{
160 <|{|\(|:)/ token: "text",
161 <|{|\(|:)/ regex: /(?=\()/,
162 <|{|\(|:)/ next: "pop"
163 <|{|\(|:)/ }, {
164 <|{|\(|:)/ token: "text",
165 <|{|\(|:)/ regex: /,
166 <|{|\(|:)/ push: [{
167 <|{|\(|:)/ token: "text",
168 <|{|\(|:)/ regex: />/,
169 <|{|\(|:)/ next: "pop"
170 <|{|\(|:)/ }, {
171 <|{|\(|:)/ include: "#generics"
172 <|{|\(|:)/ }]
173 <|{|\(|:)/ }, {
174 <|{|\(|:)/ token: ["text", "entity.name.function.kotlin"],
175 <|{|\(|:)/ regex: /((?:[\.<\?>\w]+\.)?)(\w+)/
176 <|{|\(|:)/<\?> }]
177 <|{|\(|:)/<\?> }, {
178 <|{|\(|:)/<\?> token: "text",
179 <|{|\(|:)/<\?> regex: /\(/,
180 <|{|\(|:)/<\?> push: [{
181 <|{|\(|:)/<\?> token: "text",
182 <|{|\(|:)/<\?> regex: /\)/,
183 <|{|\(|:)/<\?> next: "pop"
184 <|{|\(|:)/<\?> }, {
185 <|{|\(|:)/<\?> include: "#parameters"
186 <|{|\(|:)/<\?> }]
187 <|{|\(|:)/<\?> }, {
188 <|{|\(|:)/<\?> token: "keyword.operator.declaration.kotlin",
189 <|{|\(|:)/<\?> regex: /:/,
190 <|{|\(|:)/<\?> push: [{
191 <|{|\(|:)/<\?> token: "text",
192 <|{|\(|:)/<\?> regex: /(?={|=|$)/,
193 <|{|\(|:)/<\?> next: "pop"
194 <|{|\(|:)/<\?> }, {
195 <|{|\(|:)/<\?> include: "#types"
196 <|{|\(|:)/<\?> }]
197 <|{|\(|:)/<\?> }, {
198 <|{|\(|:)/<\?> token: "text",
199 <|{|\(|:)/<\?> regex: /\{/,
200 <|{|\(|:)/<\?> push: [{
201 <|{|\(|:)/<\?> token: "text",
202 <|{|\(|:)/<\?> regex: /(?=\})/,
203 <|{|\(|:)/<\?> next: "pop"
204 <|{|\(|:)/<\?> }, {
205 <|{|\(|:)/<\?> include: "#statements"
206 <|{|\(|:)/<\?> }]
207 <|{|\(|:)/<\?> }, {
208 <|{|\(|:)/<\?> token: "keyword.operator.assignment.kotlin",
209 <|{|\(|:)/<\?> regex: /=/,
210 <|{|\(|:)/<\?> push: [{
211 <|{|\(|:)/<\?> token: "text",
212 <|{|\(|:)/<\?> regex: /(?=$)/,
213 <|{|\(|:)/<\?> next: "pop"
214 <|{|\(|:)/<\?> }, {
215 <|{|\(|:)/<\?> include: "#expressions"
216 <|{|\(|:)/<\?> }]
217 <|{|\(|:)/<\?> }]
218 <|{|\(|:)/<\?> }],
219 <|{|\(|:)/<\?> "#generics": [{
220 <|{|\(|:)/<\?> token: "keyword.operator.declaration.kotlin",
221 <|{|\(|:)/<\?> regex: /:/,
222 <|{|\(|:)/<\?> push: [{
223 <|{|\(|:)/<\?> token: "text",
224 <|{|\(|:)/<\?> regex: /(?=,|>)/,
225 <|{|\(|:)/<\?> next: "pop"
226 <|{|\(|:)/<\?> }, {
227 <|{|\(|:)/<\?> include: "#types"
228 <|{|\(|:)/<\?> }]
229 <|{|\(|:)/<\?> }, {
230 <|{|\(|:)/<\?> include: "#keywords"
231 <|{|\(|:)/<\?> }, {
232 <|{|\(|:)/<\?> token: "storage.type.generic.kotlin",
233 <|{|\(|:)/<\?> regex: /\w+/
234 <|{|\(|:)/<\?> }],
235 <|{|\(|:)/<\?> "#getters-and-setters": [{
236 <|{|\(|:)/<\?> token: ["entity.name.function.kotlin", "text"],
237 <|{|\(|:)/<\?> regex: /\b(get)\b(\s*\(\s*\))/,
238 <|{|\(|:)/<\?> push: [{
239 <|{|\(|:)/<\?> token: "text",
240 <|{|\(|:)/<\?> regex: /\}|(?=\bset\b)|$/,
241 <|{|\(|:)/<\?> next: "pop"
242 <|{|\(|:)/<\?> }, {
243 <|{|\(|:)/<\?> token: "keyword.operator.assignment.kotlin",
244 <|{|\(|:)/<\?> regex: /=/,
245 <|{|\(|:)/<\?> push: [{
246 <|{|\(|:)/<\?> token: "text",
247 <|{|\(|:)/<\?> regex: /(?=$|\bset\b)/,
248 <|{|\(|:)/<\?> next: "pop"
249 <|{|\(|:)/<\?> }, {
250 <|{|\(|:)/<\?> include: "#expressions"
251 <|{|\(|:)/<\?> }]
252 <|{|\(|:)/<\?> }, {
253 <|{|\(|:)/<\?> token: "text",
254 <|{|\(|:)/<\?> regex: /\{/,
255 <|{|\(|:)/<\?> push: [{
256 <|{|\(|:)/<\?> token: "text",
257 <|{|\(|:)/<\?> regex: /\}/,
258 <|{|\(|:)/<\?> next: "pop"
259 <|{|\(|:)/<\?> }, {
260 <|{|\(|:)/<\?> include: "#expressions"
261 <|{|\(|:)/<\?> }]
262 <|{|\(|:)/<\?> }]
263 <|{|\(|:)/<\?> }, {
264 <|{|\(|:)/<\?> token: ["entity.name.function.kotlin", "text"],
265 <|{|\(|:)/<\?> regex: /\b(set)\b(\s*)(?=\()/,
266 <|{|\(|:)/<\?> push: [{
267 <|{|\(|:)/<\?> token: "text",
268 <|{|\(|:)/<\?> regex: /\}|(?=\bget\b)|$/,
269 <|{|\(|:)/<\?> next: "pop"
270 <|{|\(|:)/<\?> }, {
271 <|{|\(|:)/<\?> token: "text",
272 <|{|\(|:)/<\?> regex: /\(/,
273 <|{|\(|:)/<\?> push: [{
274 <|{|\(|:)/<\?> token: "text",
275 <|{|\(|:)/<\?> regex: /\)/,
276 <|{|\(|:)/<\?> next: "pop"
277 <|{|\(|:)/<\?> }, {
278 <|{|\(|:)/<\?> include: "#parameters"
279 <|{|\(|:)/<\?> }]
280 <|{|\(|:)/<\?> }, {
281 <|{|\(|:)/<\?> token: "keyword.operator.assignment.kotlin",
282 <|{|\(|:)/<\?> regex: /=/,
283 <|{|\(|:)/<\?> push: [{
284 <|{|\(|:)/<\?> token: "text",
285 <|{|\(|:)/<\?> regex: /(?=$|\bset\b)/,
286 <|{|\(|:)/<\?> next: "pop"
287 <|{|\(|:)/<\?> }, {
288 <|{|\(|:)/<\?> include: "#expressions"
289 <|{|\(|:)/<\?> }]
290 <|{|\(|:)/<\?> }, {
291 <|{|\(|:)/<\?> token: "text",
292 <|{|\(|:)/<\?> regex: /\{/,
293 <|{|\(|:)/<\?> push: [{
294 <|{|\(|:)/<\?> token: "text",
295 <|{|\(|:)/<\?> regex: /\}/,
296 <|{|\(|:)/<\?> next: "pop"
297 <|{|\(|:)/<\?> }, {
298 <|{|\(|:)/<\?> include: "#expressions"
299 <|{|\(|:)/<\?> }]
300 <|{|\(|:)/<\?> }]
301 <|{|\(|:)/<\?> }],
302 <|{|\(|:)/<\?> "#imports": [{
303 <|{|\(|:)/<\?> token: [
304 <|{|\(|:)/<\?> "text",
305 <|{|\(|:)/<\?> "keyword.other.kotlin",
306 <|{|\(|:)/<\?> "text",
307 <|{|\(|:)/<\?> "keyword.other.kotlin"
308 <|{|\(|:)/<\?> ],
309 <|{|\(|:)/<\?> regex: /^(\s*)(import)(\s+[^ $]+\s+)((?:as)?)/
310 <|{|\(|:)/<\?> }],
311 <|{|\(|:)/<\?> "#keywords": [{
312 <|{|\(|:)/<\?> token: "storage.modifier.kotlin",
313 <|{|\(|:)/<\?> regex: /\b(?:var|val|public|private|protected|abstract|final|enum|open|attribute|annotation|override|inline|var|val|vararg|lazy|in|out|internal|data|tailrec|operator|infix|const|yield|typealias|typeof)\b/
314 <|{|\(|:)/<\?> }, {
315 <|{|\(|:)/<\?> token: "keyword.control.catch-exception.kotlin",
316 <|{|\(|:)/<\?> regex: /\b(?:try|catch|finally|throw)\b/
317 <|{|\(|:)/<\?> }, {
318 <|{|\(|:)/<\?> token: "keyword.control.kotlin",
319 <|{|\(|:)/<\?> regex: /\b(?:if|else|while|for|do|return|when|where|break|continue)\b/
320 <|{|\(|:)/<\?> }, {
321 <|{|\(|:)/<\?> token: "keyword.operator.kotlin",
322 <|{|\(|:)/<\?> regex: /\b(?:in|is|as|assert)\b/
323 <|{|\(|:)/<\?> }, {
324 <|{|\(|:)/<\?> token: "keyword.operator.comparison.kotlin",
325 <|{|\(|:)/<\?> regex: /==|!=|===|!==|<=|>=|<|>/
326 <|{|\(|:)/<\?><=|><|> }, {
327 <|{|\(|:)/<\?><=|><|> token: "keyword.operator.assignment.kotlin",
328 <|{|\(|:)/<\?><=|><|> regex: /=/
329 <|{|\(|:)/<\?><=|><|> }, {
330 <|{|\(|:)/<\?><=|><|> token: "keyword.operator.declaration.kotlin",
331 <|{|\(|:)/<\?><=|><|> regex: /:/
332 <|{|\(|:)/<\?><=|><|> }, {
333 <|{|\(|:)/<\?><=|><|> token: "keyword.operator.dot.kotlin",
334 <|{|\(|:)/<\?><=|><|> regex: /\./
335 <|{|\(|:)/<\?><=|><|> }, {
336 <|{|\(|:)/<\?><=|><|> token: "keyword.operator.increment-decrement.kotlin",
337 <|{|\(|:)/<\?><=|><|> regex: /\-\-|\+\+/
338 <|{|\(|:)/<\?><=|><|> }, {
339 <|{|\(|:)/<\?><=|><|> token: "keyword.operator.arithmetic.kotlin",
340 <|{|\(|:)/<\?><=|><|> regex: /\-|\+|\*|\/|%/
341 <|{|\(|:)/<\?><=|><|> }, {
342 <|{|\(|:)/<\?><=|><|> token: "keyword.operator.arithmetic.assign.kotlin",
343 <|{|\(|:)/<\?><=|><|> regex: /\+=|\-=|\*=|\/=/
344 <|{|\(|:)/<\?><=|><|> }, {
345 <|{|\(|:)/<\?><=|><|> token: "keyword.operator.logical.kotlin",
346 <|{|\(|:)/<\?><=|><|> regex: /!|&&|\|\|/
347 <|{|\(|:)/<\?><=|><|> }, {
348 <|{|\(|:)/<\?><=|><|> token: "keyword.operator.range.kotlin",
349 <|{|\(|:)/<\?><=|><|> regex: /\.\./
350 <|{|\(|:)/<\?><=|><|> }, {
351 <|{|\(|:)/<\?><=|><|> token: "punctuation.terminator.kotlin",
352 <|{|\(|:)/<\?><=|><|> regex: /;/
353 <|{|\(|:)/<\?><=|><|> }],
354 <|{|\(|:)/<\?><=|><|> "#namespaces": [{
355 <|{|\(|:)/<\?><=|><|> token: "keyword.other.kotlin",
356 <|{|\(|:)/<\?><=|><|> regex: /\bnamespace\b/
357 <|{|\(|:)/<\?><=|><|> }, {
358 <|{|\(|:)/<\?><=|><|> token: "text",
359 <|{|\(|:)/<\?><=|><|> regex: /\{/,
360 <|{|\(|:)/<\?><=|><|> push: [{
361 <|{|\(|:)/<\?><=|><|> token: "text",
362 <|{|\(|:)/<\?><=|><|> regex: /\}/,
363 <|{|\(|:)/<\?><=|><|> next: "pop"
364 <|{|\(|:)/<\?><=|><|> }, {
365 <|{|\(|:)/<\?><=|><|> include: "#statements"
366 <|{|\(|:)/<\?><=|><|> }]
367 <|{|\(|:)/<\?><=|><|> }],
368 <|{|\(|:)/<\?><=|><|> "#parameters": [{
369 <|{|\(|:)/<\?><=|><|> token: "keyword.operator.declaration.kotlin",
370 <|{|\(|:)/<\?><=|><|> regex: /:/,
371 <|{|\(|:)/<\?><=|><|> push: [{
372 <|{|\(|:)/<\?><=|><|> token: "text",
373 <|{|\(|:)/<\?><=|><|> regex: /(?=,|\)|=)/,
374 <|{|\(|:)/<\?><=|><|> next: "pop"
375 <|{|\(|:)/<\?><=|><|> }, {
376 <|{|\(|:)/<\?><=|><|> include: "#types"
377 <|{|\(|:)/<\?><=|><|> }]
378 <|{|\(|:)/<\?><=|><|> }, {
379 <|{|\(|:)/<\?><=|><|> token: "keyword.operator.declaration.kotlin",
380 <|{|\(|:)/<\?><=|><|> regex: /=/,
381 <|{|\(|:)/<\?><=|><|> push: [{
382 <|{|\(|:)/<\?><=|><|> token: "text",
383 <|{|\(|:)/<\?><=|><|> regex: /(?=,|\))/,
384 <|{|\(|:)/<\?><=|><|> next: "pop"
385 <|{|\(|:)/<\?><=|><|> }, {
386 <|{|\(|:)/<\?><=|><|> include: "#expressions"
387 <|{|\(|:)/<\?><=|><|> }]
388 <|{|\(|:)/<\?><=|><|> }, {
389 <|{|\(|:)/<\?><=|><|> include: "#keywords"
390 <|{|\(|:)/<\?><=|><|> }, {
391 <|{|\(|:)/<\?><=|><|> token: "variable.parameter.function.kotlin",
392 <|{|\(|:)/<\?><=|><|> regex: /\w+/
393 <|{|\(|:)/<\?><=|><|> }],
394 <|{|\(|:)/<\?><=|><|> "#statements": [{
395 <|{|\(|:)/<\?><=|><|> include: "#namespaces"
396 <|{|\(|:)/<\?><=|><|> }, {
397 <|{|\(|:)/<\?><=|><|> include: "#typedefs"
398 <|{|\(|:)/<\?><=|><|> }, {
399 <|{|\(|:)/<\?><=|><|> include: "#classes"
400 <|{|\(|:)/<\?><=|><|> }, {
401 <|{|\(|:)/<\?><=|><|> include: "#functions"
402 <|{|\(|:)/<\?><=|><|> }, {
403 <|{|\(|:)/<\?><=|><|> include: "#variables"
404 <|{|\(|:)/<\?><=|><|> }, {
405 <|{|\(|:)/<\?><=|><|> include: "#getters-and-setters"
406 <|{|\(|:)/<\?><=|><|> }, {
407 <|{|\(|:)/<\?><=|><|> include: "#expressions"
408 <|{|\(|:)/<\?><=|><|> }],
409 <|{|\(|:)/<\?><=|><|> "#strings": [{
410 <|{|\(|:)/<\?><=|><|> token: "punctuation.definition.string.begin.kotlin",
411 <|{|\(|:)/<\?><=|><|> regex: /"""/,
412 <|{|\(|:)/<\?><=|><|> push: [{
413 <|{|\(|:)/<\?><=|><|> token: "punctuation.definition.string.end.kotlin",
414 <|{|\(|:)/<\?><=|><|> regex: /"""/,
415 <|{|\(|:)/<\?><=|><|> next: "pop"
416 <|{|\(|:)/<\?><=|><|> }, {
417 <|{|\(|:)/<\?><=|><|> token: "variable.parameter.template.kotlin",
418 <|{|\(|:)/<\?><=|><|> regex: /\$\w+|\$\{[^\}]+\}/
419 <|{|\(|:)/<\?><=|><|> }, {
420 <|{|\(|:)/<\?><=|><|> token: "constant.character.escape.kotlin",
421 <|{|\(|:)/<\?><=|><|> regex: /\\./
422 <|{|\(|:)/<\?><=|><|> }, {
423 <|{|\(|:)/<\?><=|><|> defaultToken: "string.quoted.third.kotlin"
424 <|{|\(|:)/<\?><=|><|> }]
425 <|{|\(|:)/<\?><=|><|> }, {
426 <|{|\(|:)/<\?><=|><|> token: "punctuation.definition.string.begin.kotlin",
427 <|{|\(|:)/<\?><=|><|> regex: /"/,
428 <|{|\(|:)/<\?><=|><|> push: [{
429 <|{|\(|:)/<\?><=|><|> token: "punctuation.definition.string.end.kotlin",
430 <|{|\(|:)/<\?><=|><|> regex: /"/,
431 <|{|\(|:)/<\?><=|><|> next: "pop"
432 <|{|\(|:)/<\?><=|><|> }, {
433 <|{|\(|:)/<\?><=|><|> token: "variable.parameter.template.kotlin",
434 <|{|\(|:)/<\?><=|><|> regex: /\$\w+|\$\{[^\}]+\}/
435 <|{|\(|:)/<\?><=|><|> }, {
436 <|{|\(|:)/<\?><=|><|> token: "constant.character.escape.kotlin",
437 <|{|\(|:)/<\?><=|><|> regex: /\\./
438 <|{|\(|:)/<\?><=|><|> }, {
439 <|{|\(|:)/<\?><=|><|> defaultToken: "string.quoted.double.kotlin"
440 <|{|\(|:)/<\?><=|><|> }]
441 <|{|\(|:)/<\?><=|><|> }, {
442 <|{|\(|:)/<\?><=|><|> token: "punctuation.definition.string.begin.kotlin",
443 <|{|\(|:)/<\?><=|><|> regex: /'/,
444 <|{|\(|:)/<\?><=|><|> push: [{
445 <|{|\(|:)/<\?><=|><|> token: "punctuation.definition.string.end.kotlin",
446 <|{|\(|:)/<\?><=|><|> regex: /'/,
447 <|{|\(|:)/<\?><=|><|> next: "pop"
448 <|{|\(|:)/<\?><=|><|> }, {
449 <|{|\(|:)/<\?><=|><|> token: "constant.character.escape.kotlin",
450 <|{|\(|:)/<\?><=|><|> regex: /\\./
451 <|{|\(|:)/<\?><=|><|> }, {
452 <|{|\(|:)/<\?><=|><|> defaultToken: "string.quoted.single.kotlin"
453 <|{|\(|:)/<\?><=|><|> }]
454 <|{|\(|:)/<\?><=|><|> }, {
455 <|{|\(|:)/<\?><=|><|> token: "punctuation.definition.string.begin.kotlin",
456 <|{|\(|:)/<\?><=|><|> regex: /`/,
457 <|{|\(|:)/<\?><=|><|> push: [{
458 <|{|\(|:)/<\?><=|><|> token: "punctuation.definition.string.end.kotlin",
459 <|{|\(|:)/<\?><=|><|> regex: /`/,
460 <|{|\(|:)/<\?><=|><|> next: "pop"
461 <|{|\(|:)/<\?><=|><|> }, {
462 <|{|\(|:)/<\?><=|><|> defaultToken: "string.quoted.single.kotlin"
463 <|{|\(|:)/<\?><=|><|> }]
464 <|{|\(|:)/<\?><=|><|> }],
465 <|{|\(|:)/<\?><=|><|> "#typedefs": [{
466 <|{|\(|:)/<\?><=|><|> token: "text",
467 <|{|\(|:)/<\?><=|><|> regex: /(?=\s*type)/,
468 <|{|\(|:)/<\?><=|><|> push: [{
469 <|{|\(|:)/<\?><=|><|> token: "text",
470 <|{|\(|:)/<\?><=|><|> regex: /(?=$)/,
471 <|{|\(|:)/<\?><=|><|> next: "pop"
472 <|{|\(|:)/<\?><=|><|> }, {
473 <|{|\(|:)/<\?><=|><|> token: "keyword.other.kotlin",
474 <|{|\(|:)/<\?><=|><|> regex: /\btype\b/
475 <|{|\(|:)/<\?><=|><|> }, {
476 <|{|\(|:)/<\?><=|><|> token: "text",
477 <|{|\(|:)/<\?><=|><|> regex: /,
478 <|{|\(|:)/<\?><=|><|> push: [{
479 <|{|\(|:)/<\?><=|><|> token: "text",
480 <|{|\(|:)/<\?><=|><|> regex: />/,
481 <|{|\(|:)/<\?><=|><|> next: "pop"
482 <|{|\(|:)/<\?><=|><|> }, {
483 <|{|\(|:)/<\?><=|><|> include: "#generics"
484 <|{|\(|:)/<\?><=|><|> }]
485 <|{|\(|:)/<\?><=|><|> }, {
486 <|{|\(|:)/<\?><=|><|> include: "#expressions"
487 <|{|\(|:)/<\?><=|><|> }]
488 <|{|\(|:)/<\?><=|><|> }],
489 <|{|\(|:)/<\?><=|><|> "#types": [{
490 <|{|\(|:)/<\?><=|><|> token: "storage.type.buildin.kotlin",
491 <|{|\(|:)/<\?><=|><|> regex: /\b(?:Any|Unit|String|Int|Boolean|Char|Long|Double|Float|Short|Byte|dynamic)\b/
492 <|{|\(|:)/<\?><=|><|> }, {
493 <|{|\(|:)/<\?><=|><|> token: "storage.type.buildin.array.kotlin",
494 <|{|\(|:)/<\?><=|><|> regex: /\b(?:IntArray|BooleanArray|CharArray|LongArray|DoubleArray|FloatArray|ShortArray|ByteArray)\b/
495 <|{|\(|:)/<\?><=|><|> }, {
496 <|{|\(|:)/<\?><=|><|> token: [
497 <|{|\(|:)/<\?><=|><|> "storage.type.buildin.collection.kotlin",
498 <|{|\(|:)/<\?><=|><|> "text"
499 <|{|\(|:)/<\?><=|><|> ],
500 <|{|\(|:)/<\?><=|><|> regex: /\b(Array|List|Map)(<\b)/,
501 <|{|\(|:)/<\?><=|><|><\b)/ push: [{
502 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
503 <|{|\(|:)/<\?><=|><|><\b)/ regex: />/,
504 <|{|\(|:)/<\?><=|><|><\b)/ next: "pop"
505 <|{|\(|:)/<\?><=|><|><\b)/ }, {
506 <|{|\(|:)/<\?><=|><|><\b)/ include: "#types"
507 <|{|\(|:)/<\?><=|><|><\b)/ }, {
508 <|{|\(|:)/<\?><=|><|><\b)/ include: "#keywords"
509 <|{|\(|:)/<\?><=|><|><\b)/ }]
510 <|{|\(|:)/<\?><=|><|><\b)/ }, {
511 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
512 <|{|\(|:)/<\?><=|><|><\b)/ regex: /\w+,
513 <|{|\(|:)/<\?><=|><|><\b)/ push: [{
514 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
515 <|{|\(|:)/<\?><=|><|><\b)/ regex: />/,
516 <|{|\(|:)/<\?><=|><|><\b)/ next: "pop"
517 <|{|\(|:)/<\?><=|><|><\b)/ }, {
518 <|{|\(|:)/<\?><=|><|><\b)/ include: "#types"
519 <|{|\(|:)/<\?><=|><|><\b)/ }, {
520 <|{|\(|:)/<\?><=|><|><\b)/ include: "#keywords"
521 <|{|\(|:)/<\?><=|><|><\b)/ }]
522 <|{|\(|:)/<\?><=|><|><\b)/ }, {
523 <|{|\(|:)/<\?><=|><|><\b)/ token: ["keyword.operator.tuple.kotlin", "text"],
524 <|{|\(|:)/<\?><=|><|><\b)/ regex: /(#)(\()/,
525 <|{|\(|:)/<\?><=|><|><\b)/ push: [{
526 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
527 <|{|\(|:)/<\?><=|><|><\b)/ regex: /\)/,
528 <|{|\(|:)/<\?><=|><|><\b)/ next: "pop"
529 <|{|\(|:)/<\?><=|><|><\b)/ }, {
530 <|{|\(|:)/<\?><=|><|><\b)/ include: "#expressions"
531 <|{|\(|:)/<\?><=|><|><\b)/ }]
532 <|{|\(|:)/<\?><=|><|><\b)/ }, {
533 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
534 <|{|\(|:)/<\?><=|><|><\b)/ regex: /\{/,
535 <|{|\(|:)/<\?><=|><|><\b)/ push: [{
536 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
537 <|{|\(|:)/<\?><=|><|><\b)/ regex: /\}/,
538 <|{|\(|:)/<\?><=|><|><\b)/ next: "pop"
539 <|{|\(|:)/<\?><=|><|><\b)/ }, {
540 <|{|\(|:)/<\?><=|><|><\b)/ include: "#statements"
541 <|{|\(|:)/<\?><=|><|><\b)/ }]
542 <|{|\(|:)/<\?><=|><|><\b)/ }, {
543 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
544 <|{|\(|:)/<\?><=|><|><\b)/ regex: /\(/,
545 <|{|\(|:)/<\?><=|><|><\b)/ push: [{
546 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
547 <|{|\(|:)/<\?><=|><|><\b)/ regex: /\)/,
548 <|{|\(|:)/<\?><=|><|><\b)/ next: "pop"
549 <|{|\(|:)/<\?><=|><|><\b)/ }, {
550 <|{|\(|:)/<\?><=|><|><\b)/ include: "#types"
551 <|{|\(|:)/<\?><=|><|><\b)/ }]
552 <|{|\(|:)/<\?><=|><|><\b)/ }, {
553 <|{|\(|:)/<\?><=|><|><\b)/ token: "keyword.operator.declaration.kotlin",
554 <|{|\(|:)/<\?><=|><|><\b)/ regex: /->/
555 <|{|\(|:)/<\?><=|><|><\b)/ }],
556 <|{|\(|:)/<\?><=|><|><\b)/ "#variables": [{
557 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
558 <|{|\(|:)/<\?><=|><|><\b)/ regex: /(?=\s*(?:var|val))/,
559 <|{|\(|:)/<\?><=|><|><\b)/ push: [{
560 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
561 <|{|\(|:)/<\?><=|><|><\b)/ regex: /(?=:|=|$)/,
562 <|{|\(|:)/<\?><=|><|><\b)/ next: "pop"
563 <|{|\(|:)/<\?><=|><|><\b)/ }, {
564 <|{|\(|:)/<\?><=|><|><\b)/ token: "keyword.other.kotlin",
565 <|{|\(|:)/<\?><=|><|><\b)/ regex: /\b(?:var|val)\b/,
566 <|{|\(|:)/<\?><=|><|><\b)/ push: [{
567 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
568 <|{|\(|:)/<\?><=|><|><\b)/ regex: /(?=:|=|$)/,
569 <|{|\(|:)/<\?><=|><|><\b)/ next: "pop"
570 <|{|\(|:)/<\?><=|><|><\b)/ }, {
571 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
572 <|{|\(|:)/<\?><=|><|><\b)/ regex: /,
573 <|{|\(|:)/<\?><=|><|><\b)/ push: [{
574 <|{|\(|:)/<\?><=|><|><\b)/ token: "text",
575 <|{|\(|:)/<\?><=|><|><\b)/ regex: />/,
576 <|{|\(|:)/<\?><=|><|><\b)/ next: "pop"
577 <|{|\(|:)/<\?><=|><|><\b)/ }, {
578 <|{|\(|:)/<\?><=|><|><\b)/ include: "#generics"
579 <|{|\(|:)/<\?><=|><|><\b)/ }]
580 <|{|\(|:)/<\?><=|><|><\b)/ }, {
581 <|{|\(|:)/<\?><=|><|><\b)/ token: ["text", "entity.name.variable.kotlin"],
582 <|{|\(|:)/<\?><=|><|><\b)/ regex: /((?:[\.<\?>\w]+\.)?)(\w+)/
583 <|{|\(|:)/<\?><=|><|><\b)/<\?> }]
584 <|{|\(|:)/<\?><=|><|><\b)/<\?> }, {
585 <|{|\(|:)/<\?><=|><|><\b)/<\?> token: "keyword.operator.declaration.kotlin",
586 <|{|\(|:)/<\?><=|><|><\b)/<\?> regex: /:/,
587 <|{|\(|:)/<\?><=|><|><\b)/<\?> push: [{
588 <|{|\(|:)/<\?><=|><|><\b)/<\?> token: "text",
589 <|{|\(|:)/<\?><=|><|><\b)/<\?> regex: /(?==|$)/,
590 <|{|\(|:)/<\?><=|><|><\b)/<\?> next: "pop"
591 <|{|\(|:)/<\?><=|><|><\b)/<\?> }, {
592 <|{|\(|:)/<\?><=|><|><\b)/<\?> include: "#types"
593 <|{|\(|:)/<\?><=|><|><\b)/<\?> }, {
594 <|{|\(|:)/<\?><=|><|><\b)/<\?> include: "#getters-and-setters"
595 <|{|\(|:)/<\?><=|><|><\b)/<\?> }]
596 <|{|\(|:)/<\?><=|><|><\b)/<\?> }, {
597 <|{|\(|:)/<\?><=|><|><\b)/<\?> token: "keyword.operator.assignment.kotlin",
598 <|{|\(|:)/<\?><=|><|><\b)/<\?> regex: /=/,
599 <|{|\(|:)/<\?><=|><|><\b)/<\?> push: [{
600 <|{|\(|:)/<\?><=|><|><\b)/<\?> token: "text",
601 <|{|\(|:)/<\?><=|><|><\b)/<\?> regex: /(?=$)/,
602 <|{|\(|:)/<\?><=|><|><\b)/<\?> next: "pop"
603 <|{|\(|:)/<\?><=|><|><\b)/<\?> }, {
604 <|{|\(|:)/<\?><=|><|><\b)/<\?> include: "#expressions"
605 <|{|\(|:)/<\?><=|><|><\b)/<\?> }, {
606 <|{|\(|:)/<\?><=|><|><\b)/<\?> include: "#getters-and-setters"
607 <|{|\(|:)/<\?><=|><|><\b)/<\?> }]
608 <|{|\(|:)/<\?><=|><|><\b)/<\?> }]
609 <|{|\(|:)/<\?><=|><|><\b)/<\?> }]
610 <|{|\(|:)/<\?><=|><|><\b)/<\?> }
611  
612 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.normalizeRules();
613 <|{|\(|:)/<\?><=|><|><\b)/<\?>};
614  
615 <|{|\(|:)/<\?><=|><|><\b)/<\?>KotlinHighlightRules.metaData = {
616 <|{|\(|:)/<\?><=|><|><\b)/<\?> fileTypes: ["kt", "kts"],
617 <|{|\(|:)/<\?><=|><|><\b)/<\?> name: "Kotlin",
618 <|{|\(|:)/<\?><=|><|><\b)/<\?> scopeName: "source.Kotlin"
619 <|{|\(|:)/<\?><=|><|><\b)/<\?>}
620  
621  
622 <|{|\(|:)/<\?><=|><|><\b)/<\?>oop.inherits(KotlinHighlightRules, TextHighlightRules);
623  
624 <|{|\(|:)/<\?><=|><|><\b)/<\?>exports.KotlinHighlightRules = KotlinHighlightRules;
625 <|{|\(|:)/<\?><=|><|><\b)/<\?>});
626  
627 <|{|\(|:)/<\?><=|><|><\b)/<\?>ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
628 <|{|\(|:)/<\?><=|><|><\b)/<\?>"use strict";
629  
630 <|{|\(|:)/<\?><=|><|><\b)/<\?>var oop = require("../../lib/oop");
631 <|{|\(|:)/<\?><=|><|><\b)/<\?>var Range = require("../../range").Range;
632 <|{|\(|:)/<\?><=|><|><\b)/<\?>var BaseFoldMode = require("./fold_mode").FoldMode;
633  
634 <|{|\(|:)/<\?><=|><|><\b)/<\?>var FoldMode = exports.FoldMode = function(commentRegex) {
635 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (commentRegex) {
636 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.foldingStartMarker = new RegExp(
637 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
638 <|{|\(|:)/<\?><=|><|><\b)/<\?> );
639 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.foldingStopMarker = new RegExp(
640 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
641 <|{|\(|:)/<\?><=|><|><\b)/<\?> );
642 <|{|\(|:)/<\?><=|><|><\b)/<\?> }
643 <|{|\(|:)/<\?><=|><|><\b)/<\?>};
644 <|{|\(|:)/<\?><=|><|><\b)/<\?>oop.inherits(FoldMode, BaseFoldMode);
645  
646 <|{|\(|:)/<\?><=|><|><\b)/<\?>(function() {
647  
648 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
649 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
650 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
651 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
652 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
653 <|{|\(|:)/<\?><=|><|><\b)/<\?> this._getFoldWidgetBase = this.getFoldWidget;
654 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.getFoldWidget = function(session, foldStyle, row) {
655 <|{|\(|:)/<\?><=|><|><\b)/<\?> var line = session.getLine(row);
656  
657 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (this.singleLineBlockCommentRe.test(line)) {
658 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
659 <|{|\(|:)/<\?><=|><|><\b)/<\?> return "";
660 <|{|\(|:)/<\?><=|><|><\b)/<\?> }
661  
662 <|{|\(|:)/<\?><=|><|><\b)/<\?> var fw = this._getFoldWidgetBase(session, foldStyle, row);
663  
664 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (!fw && this.startRegionRe.test(line))
665 <|{|\(|:)/<\?><=|><|><\b)/<\?> return "start"; // lineCommentRegionStart
666  
667 <|{|\(|:)/<\?><=|><|><\b)/<\?> return fw;
668 <|{|\(|:)/<\?><=|><|><\b)/<\?> };
669  
670 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
671 <|{|\(|:)/<\?><=|><|><\b)/<\?> var line = session.getLine(row);
672  
673 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (this.startRegionRe.test(line))
674 <|{|\(|:)/<\?><=|><|><\b)/<\?> return this.getCommentRegionBlock(session, line, row);
675  
676 <|{|\(|:)/<\?><=|><|><\b)/<\?> var match = line.match(this.foldingStartMarker);
677 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (match) {
678 <|{|\(|:)/<\?><=|><|><\b)/<\?> var i = match.index;
679  
680 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (match[1])
681 <|{|\(|:)/<\?><=|><|><\b)/<\?> return this.openingBracketBlock(session, match[1], row, i);
682  
683 <|{|\(|:)/<\?><=|><|><\b)/<\?> var range = session.getCommentFoldRange(row, i + match[0].length, 1);
684  
685 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (range && !range.isMultiLine()) {
686 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (forceMultiline) {
687 <|{|\(|:)/<\?><=|><|><\b)/<\?> range = this.getSectionRange(session, row);
688 <|{|\(|:)/<\?><=|><|><\b)/<\?> } else if (foldStyle != "all")
689 <|{|\(|:)/<\?><=|><|><\b)/<\?> range = null;
690 <|{|\(|:)/<\?><=|><|><\b)/<\?> }
691  
692 <|{|\(|:)/<\?><=|><|><\b)/<\?> return range;
693 <|{|\(|:)/<\?><=|><|><\b)/<\?> }
694  
695 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (foldStyle === "markbegin")
696 <|{|\(|:)/<\?><=|><|><\b)/<\?> return;
697  
698 <|{|\(|:)/<\?><=|><|><\b)/<\?> var match = line.match(this.foldingStopMarker);
699 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (match) {
700 <|{|\(|:)/<\?><=|><|><\b)/<\?> var i = match.index + match[0].length;
701  
702 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (match[1])
703 <|{|\(|:)/<\?><=|><|><\b)/<\?> return this.closingBracketBlock(session, match[1], row, i);
704  
705 <|{|\(|:)/<\?><=|><|><\b)/<\?> return session.getCommentFoldRange(row, i, -1);
706 <|{|\(|:)/<\?><=|><|><\b)/<\?> }
707 <|{|\(|:)/<\?><=|><|><\b)/<\?> };
708  
709 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.getSectionRange = function(session, row) {
710 <|{|\(|:)/<\?><=|><|><\b)/<\?> var line = session.getLine(row);
711 <|{|\(|:)/<\?><=|><|><\b)/<\?> var startIndent = line.search(/\S/);
712 <|{|\(|:)/<\?><=|><|><\b)/<\?> var startRow = row;
713 <|{|\(|:)/<\?><=|><|><\b)/<\?> var startColumn = line.length;
714 <|{|\(|:)/<\?><=|><|><\b)/<\?> row = row + 1;
715 <|{|\(|:)/<\?><=|><|><\b)/<\?> var endRow = row;
716 <|{|\(|:)/<\?><=|><|><\b)/<\?> var maxRow = session.getLength();
717 <|{|\(|:)/<\?><=|><|><\b)/<\?> while (++row < maxRow) {
718 <|{|\(|:)/<\?><=|><|><\b)/<\?> line = session.getLine(row);
719 <|{|\(|:)/<\?><=|><|><\b)/<\?> var indent = line.search(/\S/);
720 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (indent === -1)
721 <|{|\(|:)/<\?><=|><|><\b)/<\?> continue;
722 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (startIndent > indent)
723 <|{|\(|:)/<\?><=|><|><\b)/<\?> break;
724 <|{|\(|:)/<\?><=|><|><\b)/<\?> var subRange = this.getFoldWidgetRange(session, "all", row);
725  
726 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (subRange) {
727 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (subRange.start.row <= startRow) {
728 <|{|\(|:)/<\?><=|><|><\b)/<\?> break;
729 <|{|\(|:)/<\?><=|><|><\b)/<\?> } else if (subRange.isMultiLine()) {
730 <|{|\(|:)/<\?><=|><|><\b)/<\?> row = subRange.end.row;
731 <|{|\(|:)/<\?><=|><|><\b)/<\?> } else if (startIndent == indent) {
732 <|{|\(|:)/<\?><=|><|><\b)/<\?> break;
733 <|{|\(|:)/<\?><=|><|><\b)/<\?> }
734 <|{|\(|:)/<\?><=|><|><\b)/<\?> }
735 <|{|\(|:)/<\?><=|><|><\b)/<\?> endRow = row;
736 <|{|\(|:)/<\?><=|><|><\b)/<\?> }
737  
738 <|{|\(|:)/<\?><=|><|><\b)/<\?> return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
739 <|{|\(|:)/<\?><=|><|><\b)/<\?> };
740 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.getCommentRegionBlock = function(session, line, row) {
741 <|{|\(|:)/<\?><=|><|><\b)/<\?> var startColumn = line.search(/\s*$/);
742 <|{|\(|:)/<\?><=|><|><\b)/<\?> var maxRow = session.getLength();
743 <|{|\(|:)/<\?><=|><|><\b)/<\?> var startRow = row;
744  
745 <|{|\(|:)/<\?><=|><|><\b)/<\?> var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
746 <|{|\(|:)/<\?><=|><|><\b)/<\?> var depth = 1;
747 <|{|\(|:)/<\?><=|><|><\b)/<\?> while (++row < maxRow) {
748 <|{|\(|:)/<\?><=|><|><\b)/<\?> line = session.getLine(row);
749 <|{|\(|:)/<\?><=|><|><\b)/<\?> var m = re.exec(line);
750 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (!m) continue;
751 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (m[1]) depth--;
752 <|{|\(|:)/<\?><=|><|><\b)/<\?> else depth++;
753  
754 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (!depth) break;
755 <|{|\(|:)/<\?><=|><|><\b)/<\?> }
756  
757 <|{|\(|:)/<\?><=|><|><\b)/<\?> var endRow = row;
758 <|{|\(|:)/<\?><=|><|><\b)/<\?> if (endRow > startRow) {
759 <|{|\(|:)/<\?><=|><|><\b)/<\?> return new Range(startRow, startColumn, endRow, line.length);
760 <|{|\(|:)/<\?><=|><|><\b)/<\?> }
761 <|{|\(|:)/<\?><=|><|><\b)/<\?> };
762  
763 <|{|\(|:)/<\?><=|><|><\b)/<\?>}).call(FoldMode.prototype);
764  
765 <|{|\(|:)/<\?><=|><|><\b)/<\?>});
766  
767 <|{|\(|:)/<\?><=|><|><\b)/<\?>ace.define("ace/mode/kotlin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/kotlin_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
768 <|{|\(|:)/<\?><=|><|><\b)/<\?>"use strict";
769  
770 <|{|\(|:)/<\?><=|><|><\b)/<\?>var oop = require("../lib/oop");
771 <|{|\(|:)/<\?><=|><|><\b)/<\?>var TextMode = require("./text").Mode;
772 <|{|\(|:)/<\?><=|><|><\b)/<\?>var KotlinHighlightRules = require("./kotlin_highlight_rules").KotlinHighlightRules;
773 <|{|\(|:)/<\?><=|><|><\b)/<\?>var FoldMode = require("./folding/cstyle").FoldMode;
774  
775 <|{|\(|:)/<\?><=|><|><\b)/<\?>var Mode = function() {
776 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.HighlightRules = KotlinHighlightRules;
777 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.foldingRules = new FoldMode();
778 <|{|\(|:)/<\?><=|><|><\b)/<\?>};
779 <|{|\(|:)/<\?><=|><|><\b)/<\?>oop.inherits(Mode, TextMode);
780  
781 <|{|\(|:)/<\?><=|><|><\b)/<\?>(function() {
782 <|{|\(|:)/<\?><=|><|><\b)/<\?> this.$id = "ace/mode/kotlin"
783 <|{|\(|:)/<\?><=|><|><\b)/<\?>}).call(Mode.prototype);
784  
785 <|{|\(|:)/<\?><=|><|><\b)/<\?>exports.Mode = Mode;
786 <|{|\(|:)/<\?><=|><|><\b)/<\?>});