Debian Codegraph @

extensions/CodeEditor/modules/lib/ace/mode-partiql.js

raw symbols SCIP
1 ace.define("ace/mode/ion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/*
2 THIS FILE WAS GENERATED BY 'ligand' USING 'mode_highlight_rules.js'
3 */
4 "use strict";
5 var oop = require("../lib/oop");
6 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
7 var IonHighlightRules = function () {
8 var k_keywords_bool = "TRUE|FALSE";
9 var k_bool = k_keywords_bool;
10 var k_keywords_null = "NULL.NULL|NULL.BOOL|NULL.INT|NULL.FLOAT|NULL.DECIMAL|NULL.TIMESTAMP|NULL.STRING|NULL.SYMBOL|NULL.BLOB|NULL.CLOB|"
11 + "NULL.STRUCT|NULL.LIST|NULL.SEXP|NULL";
12 var k_null = k_keywords_null;
13 var keywordMapper = this.createKeywordMapper({
14 "constant.language.bool.ion": k_bool,
15 "constant.language.null.ion": k_null
16 }, "constant.other.symbol.identifier.ion", true);
17 var keywordMapperRule = {
18 token: keywordMapper,
19 regex: "\\b\\w+(?:\\.\\w+)?\\b"
20 };
21 this.$rules = {
22 "start": [
23 {
24 "include": "value"
25 }
26 ],
27 "value": [
28 {
29 "include": "whitespace"
30 },
31 {
32 "include": "comment"
33 },
34 {
35 "include": "annotation"
36 },
37 {
38 "include": "string"
39 },
40 {
41 "include": "number"
42 },
43 {
44 "include": "keywords"
45 },
46 {
47 "include": "symbol"
48 },
49 {
50 "include": "clob"
51 },
52 {
53 "include": "blob"
54 },
55 {
56 "include": "struct"
57 },
58 {
59 "include": "list"
60 },
61 {
62 "include": "sexp"
63 }
64 ],
65 "sexp": [
66 {
67 "token": "punctuation.definition.sexp.begin.ion",
68 "regex": "\\(",
69 "push": [
70 {
71 "token": "punctuation.definition.sexp.end.ion",
72 "regex": "\\)",
73 "next": "pop"
74 },
75 {
76 "include": "comment"
77 },
78 {
79 "include": "value"
80 },
81 {
82 "token": "storage.type.symbol.operator.ion",
83 "regex": "[\\!\\#\\%\\&\\*\\+\\-\\./\\;\\<\\=\\>\\?\\@\\^\\`\\|\\~]+"
84 }
85 ]
86 }
87 ],
88 "comment": [
89 {
90 "token": "comment.line.ion",
91 "regex": "//[^\\n]*"
92 },
93 {
94 "token": "comment.block.ion",
95 "regex": "/\\*",
96 "push": [
97 {
98 "token": "comment.block.ion",
99 "regex": "[*]/",
100 "next": "pop"
101 },
102 {
103 "token": "comment.block.ion",
104 "regex": "[^*/]+"
105 },
106 {
107 "token": "comment.block.ion",
108 "regex": "[*/]+"
109 }
110 ]
111 }
112 ],
113 "list": [
114 {
115 "token": "punctuation.definition.list.begin.ion",
116 "regex": "\\[",
117 "push": [
118 {
119 "token": "punctuation.definition.list.end.ion",
120 "regex": "\\]",
121 "next": "pop"
122 },
123 {
124 "include": "comment"
125 },
126 {
127 "include": "value"
128 },
129 {
130 "token": "punctuation.definition.list.separator.ion",
131 "regex": ","
132 }
133 ]
134 }
135 ],
136 "struct": [
137 {
138 "token": "punctuation.definition.struct.begin.ion",
139 "regex": "\\{",
140 "push": [
141 {
142 "token": "punctuation.definition.struct.end.ion",
143 "regex": "\\}",
144 "next": "pop"
145 },
146 {
147 "include": "comment"
148 },
149 {
150 "include": "value"
151 },
152 {
153 "token": "punctuation.definition.struct.separator.ion",
154 "regex": ",|:"
155 }
156 ]
157 }
158 ],
159 "blob": [
160 {
161 "token": [
162 "punctuation.definition.blob.begin.ion",
163 "string.other.blob.ion",
164 "punctuation.definition.blob.end.ion"
165 ],
166 "regex": "(\\{\\{)([^\"]*)(\\}\\})"
167 }
168 ],
169 "clob": [
170 {
171 "token": [
172 "punctuation.definition.clob.begin.ion",
173 "string.other.clob.ion",
174 "punctuation.definition.clob.end.ion"
175 ],
176 "regex": "(\\{\\{)(\"[^\"]*\")(\\}\\})"
177 }
178 ],
179 "symbol": [
180 {
181 "token": "storage.type.symbol.quoted.ion",
182 "regex": "(['])((?:(?:\\\\')|(?:[^']))*?)(['])"
183 },
184 {
185 "token": "storage.type.symbol.identifier.ion",
186 "regex": "[\\$_a-zA-Z][\\$_a-zA-Z0-9]*"
187 }
188 ],
189 "number": [
190 {
191 "token": "constant.numeric.timestamp.ion",
192 "regex": "\\d{4}(?:-\\d{2})?(?:-\\d{2})?T(?:\\d{2}:\\d{2})(?::\\d{2})?(?:\\.\\d+)?(?:Z|[-+]\\d{2}:\\d{2})?"
193 },
194 {
195 "token": "constant.numeric.timestamp.ion",
196 "regex": "\\d{4}-\\d{2}-\\d{2}T?"
197 },
198 {
199 "token": "constant.numeric.integer.binary.ion",
200 "regex": "-?0[bB][01](?:_?[01])*"
201 },
202 {
203 "token": "constant.numeric.integer.hex.ion",
204 "regex": "-?0[xX][0-9a-fA-F](?:_?[0-9a-fA-F])*"
205 },
206 {
207 "token": "constant.numeric.float.ion",
208 "regex": "-?(?:0|[1-9](?:_?\\d)*)(?:\\.(?:\\d(?:_?\\d)*)?)?(?:[eE][+-]?\\d+)"
209 },
210 {
211 "token": "constant.numeric.float.ion",
212 "regex": "(?:[-+]inf)|(?:nan)"
213 },
214 {
215 "token": "constant.numeric.decimal.ion",
216 "regex": "-?(?:0|[1-9](?:_?\\d)*)(?:(?:(?:\\.(?:\\d(?:_?\\d)*)?)(?:[dD][+-]?\\d+)|\\.(?:\\d(?:_?\\d)*)?)|(?:[dD][+-]?\\d+))"
217 },
218 {
219 "token": "constant.numeric.integer.ion",
220 "regex": "-?(?:0|[1-9](?:_?\\d)*)"
221 }
222 ],
223 "string": [
224 {
225 "token": [
226 "punctuation.definition.string.begin.ion",
227 "string.quoted.double.ion",
228 "punctuation.definition.string.end.ion"
229 ],
230 "regex": "([\"])((?:(?:\\\\\")|(?:[^\"]))*?)([\"])"
231 },
232 {
233 "token": "punctuation.definition.string.begin.ion",
234 "regex": "'{3}",
235 "push": [
236 {
237 "token": "punctuation.definition.string.end.ion",
238 "regex": "'{3}",
239 "next": "pop"
240 },
241 {
242 "token": "string.quoted.triple.ion",
243 "regex": "(?:\\\\'|[^'])+"
244 },
245 {
246 "token": "string.quoted.triple.ion",
247 "regex": "'"
248 }
249 ]
250 }
251 ],
252 "annotation": [
253 {
254 "token": [
255 "variable.language.annotation.ion",
256 "punctuation.definition.annotation.ion"
257 ],
258 "regex": /('(?:[^'\\]|\\.)*')\s*(::)/
259 },
260 {
261 "token": [
262 "variable.language.annotation.ion",
263 "punctuation.definition.annotation.ion"
264 ],
265 "regex": "([\\$_a-zA-Z][\\$_a-zA-Z0-9]*)\\s*(::)"
266 }
267 ],
268 "whitespace": [
269 {
270 "token": "text.ion",
271 "regex": "\\s+"
272 }
273 ]
274 };
275 this.$rules["keywords"] = [keywordMapperRule];
276 this.normalizeRules();
277 };
278 oop.inherits(IonHighlightRules, TextHighlightRules);
279 exports.IonHighlightRules = IonHighlightRules;
280
281 });
282
283 ace.define("ace/mode/partiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/ion_highlight_rules"], function(require, exports, module){/*
284 THIS FILE WAS GENERATED BY 'ligand' USING 'mode_highlight_rules.js'
285 */
286 "use strict";
287 var oop = require("../lib/oop");
288 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
289 var IonHighlightRules = require("./ion_highlight_rules").IonHighlightRules;
290 var PartiqlHighlightRules = function () {
291 var k_partiql_constant = "MISSING";
292 var k_sql_constant = "FALSE|NULL|TRUE";
293 var k_constant = k_partiql_constant + "|" + k_sql_constant;
294 var k_partiql_keyword = "PIVOT|UNPIVOT|LIMIT|TUPLE|REMOVE|INDEX|CONFLICT|DO|NOTHING|RETURNING|"
295 + "MODIFIED|NEW|OLD|LET";
296 var k_sql_keyword = "ABSOLUTE|ACTION|ADD|ALL|ALLOCATE|ALTER|AND|ANY|ARE|AS|"
297 + "ASC|ASSERTION|AT|AUTHORIZATION|BEGIN|BETWEEN|BIT_LENGTH|BY|CASCADE|CASCADED|"
298 + "CASE|CATALOG|CHAR|CHARACTER_LENGTH|CHAR_LENGTH|CHECK|CLOSE|COLLATE|COLLATION|COLUMN|"
299 + "COMMIT|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONTINUE|CONVERT|CORRESPONDING|CREATE|CROSS|"
300 + "CURRENT|CURSOR|DEALLOCATE|DEC|DECLARE|DEFAULT|DEFERRABLE|DEFERRED|DELETE|DESC|"
301 + "DESCRIBE|DESCRIPTOR|DIAGNOSTICS|DISCONNECT|DISTINCT|DOMAIN|DROP|ELSE|END|END-EXEC|"
302 + "ESCAPE|EXCEPT|EXCEPTION|EXEC|EXECUTE|EXTERNAL|EXTRACT|FETCH|FIRST|FOR|"
303 + "FOREIGN|FOUND|FROM|FULL|GET|GLOBAL|GO|GOTO|GRANT|GROUP|"
304 + "HAVING|IDENTITY|IMMEDIATE|IN|INDICATOR|INITIALLY|INNER|INPUT|INSENSITIVE|INSERT|"
305 + "INTERSECT|INTERVAL|INTO|IS|ISOLATION|JOIN|KEY|LANGUAGE|LAST|LEFT|"
306 + "LEVEL|LIKE|LOCAL|LOWER|MATCH|MODULE|NAMES|NATIONAL|NATURAL|NCHAR|"
307 + "NEXT|NO|NOT|OCTET_LENGTH|OF|ON|ONLY|OPEN|OPTION|OR|"
308 + "ORDER|OUTER|OUTPUT|OVERLAPS|PAD|PARTIAL|POSITION|PRECISION|PREPARE|PRESERVE|"
309 + "PRIMARY|PRIOR|PRIVILEGES|PROCEDURE|PUBLIC|READ|REAL|REFERENCES|RELATIVE|RESTRICT|"
310 + "REVOKE|RIGHT|ROLLBACK|ROWS|SCHEMA|SCROLL|SECTION|SELECT|SESSION|SET|"
311 + "SIZE|SOME|SPACE|SQL|SQLCODE|SQLERROR|SQLSTATE|TABLE|TEMPORARY|THEN|"
312 + "TIME|TO|TRANSACTION|TRANSLATE|TRANSLATION|UNION|UNIQUE|UNKNOWN|UPDATE|UPPER|"
313 + "USAGE|USER|USING|VALUE|VALUES|VIEW|WHEN|WHENEVER|WHERE|WITH|"
314 + "WORK|WRITE|ZONE";
315 var k_keyword = k_partiql_keyword + "|" + k_sql_keyword;
316 var k_partiql_type = "BOOL|BOOLEAN|STRING|SYMBOL|CLOB|BLOB|STRUCT|LIST|SEXP|BAG";
317 var k_sql_type = "CHARACTER|DATE|DECIMAL|DOUBLE|FLOAT|INT|INTEGER|NUMERIC|SMALLINT|TIMESTAMP|"
318 + "VARCHAR|VARYING";
319 var k_type = k_partiql_type + "|" + k_sql_type;
320 var k_sql_aggfn = "AVG|COUNT|MAX|MIN|SUM";
321 var k_aggfn = k_sql_aggfn;
322 var k_sql_fn = "CAST|COALESCE|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|EXISTS|DATE_ADD|DATE_DIFF|NULLIF|"
323 + "SESSION_USER|SUBSTRING|SYSTEM_USER|TRIM";
324 var k_fn = k_sql_fn;
325 var keywordMapper = this.createKeywordMapper({
326 "constant.language.partiql": k_constant,
327 "keyword.other.partiql": k_keyword,
328 "storage.type.partiql": k_type,
329 "support.function.aggregation.partiql": k_aggfn,
330 "support.function.partiql": k_fn
331 }, "variable.language.identifier.partiql", true);
332 var keywordMapperRule = {
333 token: keywordMapper,
334 regex: "\\b\\w+\\b"
335 };
336 this.$rules = {
337 "start": [
338 {
339 "include": "whitespace"
340 },
341 {
342 "include": "comment"
343 },
344 {
345 "include": "value"
346 }
347 ],
348 "value": [
349 {
350 "include": "whitespace"
351 },
352 {
353 "include": "comment"
354 },
355 {
356 "include": "tuple_value"
357 },
358 {
359 "include": "collection_value"
360 },
361 {
362 "include": "scalar_value"
363 }
364 ],
365 "scalar_value": [
366 {
367 "include": "string"
368 },
369 {
370 "include": "number"
371 },
372 {
373 "include": "keywords"
374 },
375 {
376 "include": "identifier"
377 },
378 {
379 "include": "embed-ion"
380 },
381 {
382 "include": "operator"
383 },
384 {
385 "include": "punctuation"
386 }
387 ],
388 "punctuation": [
389 {
390 "token": "punctuation.partiql",
391 "regex": "[;:()\\[\\]\\{\\},.]"
392 }
393 ],
394 "operator": [
395 {
396 "token": "keyword.operator.partiql",
397 "regex": "[+*/<>=~!@#%&|?^-]+"
398 }
399 ],
400 "identifier": [
401 {
402 "token": "variable.language.identifier.quoted.partiql",
403 "regex": "([\"])((?:(?:\\\\.)|(?:[^\"\\\\]))*?)([\"])"
404 },
405 {
406 "token": "variable.language.identifier.at.partiql",
407 "regex": "@\\w+"
408 },
409 {
410 "token": "variable.language.identifier.partiql",
411 "regex": "\\b\\w+(?:\\.\\w+)?\\b"
412 }
413 ],
414 "number": [
415 {
416 "token": "constant.numeric.partiql",
417 "regex": "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
418 }
419 ],
420 "string": [
421 {
422 "token": [
423 "punctuation.definition.string.begin.partiql",
424 "string.quoted.single.partiql",
425 "punctuation.definition.string.end.partiql"
426 ],
427 "regex": "(['])((?:(?:\\\\.)|(?:[^'\\\\]))*?)(['])"
428 }
429 ],
430 "collection_value": [
431 {
432 "include": "array_value"
433 },
434 {
435 "include": "bag_value"
436 }
437 ],
438 "bag_value": [
439 {
440 "token": "punctuation.definition.bag.begin.partiql",
441 "regex": "<<",
442 "push": [
443 {
444 "token": "punctuation.definition.bag.end.partiql",
445 "regex": ">>",
446 "next": "pop"
447 },
448 {
449 "include": "comment"
450 },
451 {
452 "token": "punctuation.definition.bag.separator.partiql",
453 "regex": ","
454 },
455 {
456 "include": "value"
457 }
458 ]
459 }
460 ],
461 "comment": [
462 {
463 "token": "comment.line.partiql",
464 "regex": "--.*"
465 },
466 {
467 "token": "comment.block.partiql",
468 "regex": "/\\*",
469 "push": "comment__1"
470 }
471 ],
472 "comment__1": [
473 {
474 "token": "comment.block.partiql",
475 "regex": "[*]/",
476 "next": "pop"
477 },
478 {
479 "token": "comment.block.partiql",
480 "regex": "[^*/]+"
481 },
482 {
483 "token": "comment.block.partiql",
484 "regex": "/\\*",
485 "push": "comment__1"
486 },
487 {
488 "token": "comment.block.partiql",
489 "regex": "[*/]+"
490 }
491 ],
492 "array_value": [
493 {
494 "token": "punctuation.definition.array.begin.partiql",
495 "regex": "\\[",
496 "push": [
497 {
498 "token": "punctuation.definition.array.end.partiql",
499 "regex": "\\]",
500 "next": "pop"
501 },
502 {
503 "include": "comment"
504 },
505 {
506 "token": "punctuation.definition.array.separator.partiql",
507 "regex": ","
508 },
509 {
510 "include": "value"
511 }
512 ]
513 }
514 ],
515 "tuple_value": [
516 {
517 "token": "punctuation.definition.tuple.begin.partiql",
518 "regex": "\\{",
519 "push": [
520 {
521 "token": "punctuation.definition.tuple.end.partiql",
522 "regex": "\\}",
523 "next": "pop"
524 },
525 {
526 "include": "comment"
527 },
528 {
529 "token": "punctuation.definition.tuple.separator.partiql",
530 "regex": ",|:"
531 },
532 {
533 "include": "value"
534 }
535 ]
536 }
537 ],
538 "whitespace": [
539 {
540 "token": "text.partiql",
541 "regex": "\\s+"
542 }
543 ]
544 };
545 this.$rules["keywords"] = [keywordMapperRule];
546 this.$rules["embed-ion"] = [{ token: "punctuation.definition.ion.begin.partiql", regex: "`", next: "ion-start" }];
547 this.embedRules(IonHighlightRules, "ion-", [{ token: "punctuation.definition.ion.end.partiql", regex: "`", next: "start" }]);
548 this.normalizeRules();
549 };
550 oop.inherits(PartiqlHighlightRules, TextHighlightRules);
551 exports.PartiqlHighlightRules = PartiqlHighlightRules;
552
553 });
554
555 ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict";
556 var Range = require("../range").Range;
557 var MatchingBraceOutdent = function () { };
558 (function () {
559 this.checkOutdent = function (line, input) {
560 if (!/^\s+$/.test(line))
561 return false;
562 return /^\s*\}/.test(input);
563 };
564 this.autoOutdent = function (doc, row) {
565 var line = doc.getLine(row);
566 var match = line.match(/^(\s*\})/);
567 if (!match)
568 return 0;
569 var column = match[1].length;
570 var openBracePos = doc.findMatchingBracket({ row: row, column: column });
571 if (!openBracePos || openBracePos.row == row)
572 return 0;
573 var indent = this.$getIndent(doc.getLine(openBracePos.row));
574 doc.replace(new Range(row, 0, row, column - 1), indent);
575 };
576 this.$getIndent = function (line) {
577 return line.match(/^\s*/)[0];
578 };
579 }).call(MatchingBraceOutdent.prototype);
580 exports.MatchingBraceOutdent = MatchingBraceOutdent;
581
582 });
583
584 ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
585 var oop = require("../../lib/oop");
586 var Range = require("../../range").Range;
587 var BaseFoldMode = require("./fold_mode").FoldMode;
588 var FoldMode = exports.FoldMode = function (commentRegex) {
589 if (commentRegex) {
590 this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
591 this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
592 }
593 };
594 oop.inherits(FoldMode, BaseFoldMode);
595 (function () {
596 this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
597 this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
598 this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
599 this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
600 this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
601 this._getFoldWidgetBase = this.getFoldWidget;
602 this.getFoldWidget = function (session, foldStyle, row) {
603 var line = session.getLine(row);
604 if (this.singleLineBlockCommentRe.test(line)) {
605 if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
606 return "";
607 }
608 var fw = this._getFoldWidgetBase(session, foldStyle, row);
609 if (!fw && this.startRegionRe.test(line))
610 return "start"; // lineCommentRegionStart
611 return fw;
612 };
613 this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
614 var line = session.getLine(row);
615 if (this.startRegionRe.test(line))
616 return this.getCommentRegionBlock(session, line, row);
617 var match = line.match(this.foldingStartMarker);
618 if (match) {
619 var i = match.index;
620 if (match[1])
621 return this.openingBracketBlock(session, match[1], row, i);
622 var range = session.getCommentFoldRange(row, i + match[0].length, 1);
623 if (range && !range.isMultiLine()) {
624 if (forceMultiline) {
625 range = this.getSectionRange(session, row);
626 }
627 else if (foldStyle != "all")
628 range = null;
629 }
630 return range;
631 }
632 if (foldStyle === "markbegin")
633 return;
634 var match = line.match(this.foldingStopMarker);
635 if (match) {
636 var i = match.index + match[0].length;
637 if (match[1])
638 return this.closingBracketBlock(session, match[1], row, i);
639 return session.getCommentFoldRange(row, i, -1);
640 }
641 };
642 this.getSectionRange = function (session, row) {
643 var line = session.getLine(row);
644 var startIndent = line.search(/\S/);
645 var startRow = row;
646 var startColumn = line.length;
647 row = row + 1;
648 var endRow = row;
649 var maxRow = session.getLength();
650 while (++row < maxRow) {
651 line = session.getLine(row);
652 var indent = line.search(/\S/);
653 if (indent === -1)
654 continue;
655 if (startIndent > indent)
656 break;
657 var subRange = this.getFoldWidgetRange(session, "all", row);
658 if (subRange) {
659 if (subRange.start.row <= startRow) {
660 break;
661 }
662 else if (subRange.isMultiLine()) {
663 row = subRange.end.row;
664 }
665 else if (startIndent == indent) {
666 break;
667 }
668 }
669 endRow = row;
670 }
671 return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
672 };
673 this.getCommentRegionBlock = function (session, line, row) {
674 var startColumn = line.search(/\s*$/);
675 var maxRow = session.getLength();
676 var startRow = row;
677 var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
678 var depth = 1;
679 while (++row < maxRow) {
680 line = session.getLine(row);
681 var m = re.exec(line);
682 if (!m)
683 continue;
684 if (m[1])
685 depth--;
686 else
687 depth++;
688 if (!depth)
689 break;
690 }
691 var endRow = row;
692 if (endRow > startRow) {
693 return new Range(startRow, startColumn, endRow, line.length);
694 }
695 };
696 }).call(FoldMode.prototype);
697
698 });
699
700 ace.define("ace/mode/partiql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/partiql_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){/*
701 THIS FILE WAS GENERATED BY 'ligand' USING 'mode.js'
702 */
703 "use strict";
704 var oop = require("../lib/oop");
705 var TextMode = require("./text").Mode;
706 var HighlightRules = require("./partiql_highlight_rules").PartiqlHighlightRules;
707 var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
708 var CStyleFoldMode = require("./folding/cstyle").FoldMode;
709 var Mode = function () {
710 this.HighlightRules = HighlightRules;
711 this.$outdent = new MatchingBraceOutdent();
712 this.$behaviour = this.$defaultBehaviour;
713 this.foldingRules = new CStyleFoldMode();
714 };
715 oop.inherits(Mode, TextMode);
716 (function () {
717 this.lineCommentStart = "--";
718 this.blockComment = {
719 start: "/*",
720 end: "*/",
721 nestable: true
722 };
723 this.getNextLineIndent = function (state, line, tab) {
724 var indent = this.$getIndent(line);
725 if (state == "start") {
726 var match = line.match(/^.*[\{\(\[]\s*$/);
727 if (match) {
728 indent += tab;
729 }
730 }
731 return indent;
732 };
733 this.checkOutdent = function (state, line, input) {
734 return this.$outdent.checkOutdent(line, input);
735 };
736 this.autoOutdent = function (state, doc, row) {
737 this.$outdent.autoOutdent(doc, row);
738 };
739 this.$id = "ace/mode/partiql";
740 }).call(Mode.prototype);
741 exports.Mode = Mode;
742
743 }); (function() {
744 ace.require(["ace/mode/partiql"], function(m) {
745 if (typeof module == "object" && typeof exports == "object" && module) {
746 module.exports = m;
747 }
748 });
749 })();
750