Debian Codegraph @

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

raw symbols SCIP
1 ace.define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
2 var oop = require("../lib/oop");
3 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
4 var LuceneHighlightRules = function () {
5 this.$rules = {
6 "start": [
7 {
8 token: "constant.language.escape",
9 regex: /\\[\-+&|!(){}\[\]^"~*?:\\]/
10 }, {
11 token: "constant.character.negation",
12 regex: "\\-"
13 }, {
14 token: "constant.character.interro",
15 regex: "\\?"
16 }, {
17 token: "constant.character.required",
18 regex: "\\+"
19 }, {
20 token: "constant.character.asterisk",
21 regex: "\\*"
22 }, {
23 token: 'constant.character.proximity',
24 regex: '~(?:0\\.[0-9]+|[0-9]+)?'
25 }, {
26 token: 'keyword.operator',
27 regex: '(AND|OR|NOT|TO)\\b'
28 }, {
29 token: "paren.lparen",
30 regex: "[\\(\\{\\[]"
31 }, {
32 token: "paren.rparen",
33 regex: "[\\)\\}\\]]"
34 }, {
35 token: "keyword.operator",
36 regex: /[><=^]/
37 }, {
38 token: "constant.numeric",
39 regex: /\d[\d.-]*/
40 }, {
41 token: "string",
42 regex: /"(?:\\"|[^"])*"/
43 }, {
44 token: "keyword",
45 regex: /(?:\\.|[^\s\-+&|!(){}\[\]^"~*?:\\])+:/,
46 next: "maybeRegex"
47 }, {
48 token: "term",
49 regex: /\w+/
50 }, {
51 token: "text",
52 regex: /\s+/
53 }
54 ],
55 "maybeRegex": [{
56 token: "text",
57 regex: /\s+/
58 }, {
59 token: "string.regexp.start",
60 regex: "/",
61 next: "regex"
62 }, {
63 regex: "",
64 next: "start"
65 }],
66 "regex": [
67 {
68 token: "regexp.keyword.operator",
69 regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
70 }, {
71 token: "string.regexp.end",
72 regex: "/[sxngimy]*",
73 next: "start"
74 }, {
75 token: "invalid",
76 regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
77 }, {
78 token: "constant.language.escape",
79 regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
80 }, {
81 token: "constant.language.escape",
82 regex: "<\d+-\d+>|[~&@]"
83 }, {
84 token: "constant.language.delimiter",
85 regex: /\|/
86 }, {
87 token: "constant.language.escape",
88 regex: /\[\^?/,
89 next: "regex_character_class"
90 }, {
91 token: "empty",
92 regex: "$",
93 next: "start"
94 }, {
95 defaultToken: "string.regexp"
96 }
97 ],
98 "regex_character_class": [
99 {
100 token: "regexp.charclass.keyword.operator",
101 regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
102 }, {
103 token: "constant.language.escape",
104 regex: "]",
105 next: "regex"
106 }, {
107 token: "constant.language.escape",
108 regex: "-"
109 }, {
110 token: "empty",
111 regex: "$",
112 next: "start"
113 }, {
114 defaultToken: "string.regexp.characterclass"
115 }
116 ]
117 };
118 };
119 oop.inherits(LuceneHighlightRules, TextHighlightRules);
120 exports.LuceneHighlightRules = LuceneHighlightRules;
121
122 });
123
124 ace.define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"], function(require, exports, module){'use strict';
125 var oop = require("../lib/oop");
126 var TextMode = require("./text").Mode;
127 var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules;
128 var Mode = function () {
129 this.HighlightRules = LuceneHighlightRules;
130 this.$behaviour = this.$defaultBehaviour;
131 };
132 oop.inherits(Mode, TextMode);
133 (function () {
134 this.$id = "ace/mode/lucene";
135 }).call(Mode.prototype);
136 exports.Mode = Mode;
137
138 }); (function() {
139 ace.require(["ace/mode/lucene"], function(m) {
140 if (typeof module == "object" && typeof exports == "object" && module) {
141 module.exports = m;
142 }
143 });
144 })();
145