corrade-nucleus-nucleons – Blame information for rev 24
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
20 | office | 1 | ace.define("ace/mode/elm_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 ElmHighlightRules = function() { |
||
8 | var keywordMapper = this.createKeywordMapper({ |
||
9 | "keyword": "as|case|class|data|default|deriving|do|else|export|foreign|" + |
||
10 | "hiding|jsevent|if|import|in|infix|infixl|infixr|instance|let|" + |
||
11 | "module|newtype|of|open|then|type|where|_|port|\u03BB" |
||
12 | }, "identifier"); |
||
13 | |||
14 | var escapeRe = /\\(\d+|['"\\&trnbvf])/; |
||
15 | |||
16 | var smallRe = /[a-z_]/.source; |
||
17 | var largeRe = /[A-Z]/.source; |
||
18 | var idRe = /[a-z_A-Z0-9']/.source; |
||
19 | |||
20 | this.$rules = { |
||
21 | start: [{ |
||
22 | token: "string.start", |
||
23 | regex: '"', |
||
24 | next: "string" |
||
25 | }, { |
||
26 | token: "string.character", |
||
27 | regex: "'(?:" + escapeRe.source + "|.)'?" |
||
28 | }, { |
||
29 | regex: /0(?:[xX][0-9A-Fa-f]+|[oO][0-7]+)|\d+(\.\d+)?([eE][-+]?\d*)?/, |
||
30 | token: "constant.numeric" |
||
31 | }, { |
||
32 | token: "comment", |
||
33 | regex: "--.*" |
||
34 | }, { |
||
35 | token : "keyword", |
||
36 | regex : /\.\.|\||:|=|\\|"|->|<-|\u2192/-|\u2192/ |
||
37 | <-|\u2192/ }, {-|\u2192/ |
||
38 | <-|\u2192/ token : "keyword.operator",-|\u2192/ |
||
39 | <-|\u2192/ regex : /[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/=>-|\u2192/ |
||
40 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
41 | <-|\u2192/<=> token : "operator.punctuation",=>-|\u2192/ |
||
42 | <-|\u2192/<=> regex : /[,;`]/=>-|\u2192/ |
||
43 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
44 | <-|\u2192/<=> regex : largeRe + idRe + "+\\.?",=>-|\u2192/ |
||
45 | <-|\u2192/<=> token : function(value) {=>-|\u2192/ |
||
46 | <-|\u2192/<=> if (value[value.length - 1] == ".")=>-|\u2192/ |
||
47 | <-|\u2192/<=> return "entity.name.function"; =>-|\u2192/ |
||
48 | <-|\u2192/<=> return "constant.language"; =>-|\u2192/ |
||
49 | <-|\u2192/<=> }=>-|\u2192/ |
||
50 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
51 | <-|\u2192/<=> regex : "^" + smallRe + idRe + "+",=>-|\u2192/ |
||
52 | <-|\u2192/<=> token : function(value) {=>-|\u2192/ |
||
53 | <-|\u2192/<=> return "constant.language"; =>-|\u2192/ |
||
54 | <-|\u2192/<=> }=>-|\u2192/ |
||
55 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
56 | <-|\u2192/<=> token : keywordMapper,=>-|\u2192/ |
||
57 | <-|\u2192/<=> regex : "[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"=>-|\u2192/ |
||
58 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
59 | <-|\u2192/<=> regex: "{-#?",=>-|\u2192/ |
||
60 | <-|\u2192/<=> token: "comment.start",=>-|\u2192/ |
||
61 | <-|\u2192/<=> onMatch: function(value, currentState, stack) {=>-|\u2192/ |
||
62 | <-|\u2192/<=> this.next = value.length == 2 ? "blockComment" : "docComment";=>-|\u2192/ |
||
63 | <-|\u2192/<=> return this.token;=>-|\u2192/ |
||
64 | <-|\u2192/<=> }=>-|\u2192/ |
||
65 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
66 | <-|\u2192/<=> token: "variable.language",=>-|\u2192/ |
||
67 | <-|\u2192/<=> regex: /\[markdown\|/,=>-|\u2192/ |
||
68 | <-|\u2192/<=> next: "markdown"=>-|\u2192/ |
||
69 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
70 | <-|\u2192/<=> token: "paren.lparen",=>-|\u2192/ |
||
71 | <-|\u2192/<=> regex: /[\[({]/ =>-|\u2192/ |
||
72 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
73 | <-|\u2192/<=> token: "paren.rparen",=>-|\u2192/ |
||
74 | <-|\u2192/<=> regex: /[\])}]/=>-|\u2192/ |
||
75 | <-|\u2192/<=> } ],=>-|\u2192/ |
||
76 | <-|\u2192/<=> markdown: [{=>-|\u2192/ |
||
77 | <-|\u2192/<=> regex: /\|\]/,=>-|\u2192/ |
||
78 | <-|\u2192/<=> next: "start"=>-|\u2192/ |
||
79 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
80 | <-|\u2192/<=> defaultToken : "string"=>-|\u2192/ |
||
81 | <-|\u2192/<=> }],=>-|\u2192/ |
||
82 | <-|\u2192/<=> blockComment: [{=>-|\u2192/ |
||
83 | <-|\u2192/<=> regex: "{-",=>-|\u2192/ |
||
84 | <-|\u2192/<=> token: "comment.start",=>-|\u2192/ |
||
85 | <-|\u2192/<=> push: "blockComment"=>-|\u2192/ |
||
86 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
87 | <-|\u2192/<=> regex: "-}",=>-|\u2192/ |
||
88 | <-|\u2192/<=> token: "comment.end",=>-|\u2192/ |
||
89 | <-|\u2192/<=> next: "pop"=>-|\u2192/ |
||
90 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
91 | <-|\u2192/<=> defaultToken: "comment"=>-|\u2192/ |
||
92 | <-|\u2192/<=> }],=>-|\u2192/ |
||
93 | <-|\u2192/<=> docComment: [{=>-|\u2192/ |
||
94 | <-|\u2192/<=> regex: "{-",=>-|\u2192/ |
||
95 | <-|\u2192/<=> token: "comment.start",=>-|\u2192/ |
||
96 | <-|\u2192/<=> push: "docComment"=>-|\u2192/ |
||
97 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
98 | <-|\u2192/<=> regex: "-}",=>-|\u2192/ |
||
99 | <-|\u2192/<=> token: "comment.end",=>-|\u2192/ |
||
100 | <-|\u2192/<=> next: "pop" =>-|\u2192/ |
||
101 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
102 | <-|\u2192/<=> defaultToken: "doc.comment"=>-|\u2192/ |
||
103 | <-|\u2192/<=> }],=>-|\u2192/ |
||
104 | <-|\u2192/<=> string: [{=>-|\u2192/ |
||
105 | <-|\u2192/<=> token: "constant.language.escape",=>-|\u2192/ |
||
106 | <-|\u2192/<=> regex: escapeRe=>-|\u2192/ |
||
107 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
108 | <-|\u2192/<=> token: "text",=>-|\u2192/ |
||
109 | <-|\u2192/<=> regex: /\\(\s|$)/,=>-|\u2192/ |
||
110 | <-|\u2192/<=> next: "stringGap"=>-|\u2192/ |
||
111 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
112 | <-|\u2192/<=> token: "string.end",=>-|\u2192/ |
||
113 | <-|\u2192/<=> regex: '"',=>-|\u2192/ |
||
114 | <-|\u2192/<=> next: "start"=>-|\u2192/ |
||
115 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
116 | <-|\u2192/<=> defaultToken: "string"=>-|\u2192/ |
||
117 | <-|\u2192/<=> }],=>-|\u2192/ |
||
118 | <-|\u2192/<=> stringGap: [{=>-|\u2192/ |
||
119 | <-|\u2192/<=> token: "text",=>-|\u2192/ |
||
120 | <-|\u2192/<=> regex: /\\/,=>-|\u2192/ |
||
121 | <-|\u2192/<=> next: "string"=>-|\u2192/ |
||
122 | <-|\u2192/<=> }, {=>-|\u2192/ |
||
123 | <-|\u2192/<=> token: "error",=>-|\u2192/ |
||
124 | <-|\u2192/<=> regex: "",=>-|\u2192/ |
||
125 | <-|\u2192/<=> next: "start"=>-|\u2192/ |
||
126 | <-|\u2192/<=> }]=>-|\u2192/ |
||
127 | <-|\u2192/<=> };=>-|\u2192/ |
||
128 | |||
129 | <-|\u2192/<=> this.normalizeRules();=>-|\u2192/ |
||
130 | <-|\u2192/<=>};=>-|\u2192/ |
||
131 | |||
132 | <-|\u2192/<=>oop.inherits(ElmHighlightRules, TextHighlightRules);=>-|\u2192/ |
||
133 | |||
134 | <-|\u2192/<=>exports.ElmHighlightRules = ElmHighlightRules;=>-|\u2192/ |
||
135 | <-|\u2192/<=>});=>-|\u2192/ |
||
136 | |||
137 | <-|\u2192/<=>ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {=>-|\u2192/ |
||
138 | <-|\u2192/<=>"use strict";=>-|\u2192/ |
||
139 | |||
140 | <-|\u2192/<=>var oop = require("../../lib/oop");=>-|\u2192/ |
||
141 | <-|\u2192/<=>var Range = require("../../range").Range;=>-|\u2192/ |
||
142 | <-|\u2192/<=>var BaseFoldMode = require("./fold_mode").FoldMode;=>-|\u2192/ |
||
143 | |||
144 | <-|\u2192/<=>var FoldMode = exports.FoldMode = function(commentRegex) {=>-|\u2192/ |
||
145 | <-|\u2192/<=> if (commentRegex) {=>-|\u2192/ |
||
146 | <-|\u2192/<=> this.foldingStartMarker = new RegExp(=>-|\u2192/ |
||
147 | <-|\u2192/<=> this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)=>-|\u2192/ |
||
148 | <-|\u2192/<=> );=>-|\u2192/ |
||
149 | <-|\u2192/<=> this.foldingStopMarker = new RegExp(=>-|\u2192/ |
||
150 | <-|\u2192/<=> this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)=>-|\u2192/ |
||
151 | <-|\u2192/<=> );=>-|\u2192/ |
||
152 | <-|\u2192/<=> }=>-|\u2192/ |
||
153 | <-|\u2192/<=>};=>-|\u2192/ |
||
154 | <-|\u2192/<=>oop.inherits(FoldMode, BaseFoldMode);=>-|\u2192/ |
||
155 | |||
156 | <-|\u2192/<=>(function() {=>-|\u2192/ |
||
157 | |||
158 | <-|\u2192/<=> this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;=>-|\u2192/ |
||
159 | <-|\u2192/<=> this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;=>-|\u2192/ |
||
160 | <-|\u2192/<=> this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;=>-|\u2192/ |
||
161 | <-|\u2192/<=> this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;=>-|\u2192/ |
||
162 | <-|\u2192/<=> this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;=>-|\u2192/ |
||
163 | <-|\u2192/<=> this._getFoldWidgetBase = this.getFoldWidget;=>-|\u2192/ |
||
164 | <-|\u2192/<=> this.getFoldWidget = function(session, foldStyle, row) {=>-|\u2192/ |
||
165 | <-|\u2192/<=> var line = session.getLine(row);=>-|\u2192/ |
||
166 | |||
167 | <-|\u2192/<=> if (this.singleLineBlockCommentRe.test(line)) {=>-|\u2192/ |
||
168 | <-|\u2192/<=> if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))=>-|\u2192/ |
||
169 | <-|\u2192/<=> return "";=>-|\u2192/ |
||
170 | <-|\u2192/<=> }=>-|\u2192/ |
||
171 | |||
172 | <-|\u2192/<=> var fw = this._getFoldWidgetBase(session, foldStyle, row);=>-|\u2192/ |
||
173 | |||
174 | <-|\u2192/<=> if (!fw && this.startRegionRe.test(line))=>-|\u2192/ |
||
175 | <-|\u2192/<=> return "start"; // lineCommentRegionStart=>-|\u2192/ |
||
176 | |||
177 | <-|\u2192/<=> return fw;=>-|\u2192/ |
||
178 | <-|\u2192/<=> };=>-|\u2192/ |
||
179 | |||
180 | <-|\u2192/<=> this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {=>-|\u2192/ |
||
181 | <-|\u2192/<=> var line = session.getLine(row);=>-|\u2192/ |
||
182 | |||
183 | <-|\u2192/<=> if (this.startRegionRe.test(line))=>-|\u2192/ |
||
184 | <-|\u2192/<=> return this.getCommentRegionBlock(session, line, row);=>-|\u2192/ |
||
185 | |||
186 | <-|\u2192/<=> var match = line.match(this.foldingStartMarker);=>-|\u2192/ |
||
187 | <-|\u2192/<=> if (match) {=>-|\u2192/ |
||
188 | <-|\u2192/<=> var i = match.index;=>-|\u2192/ |
||
189 | |||
190 | <-|\u2192/<=> if (match[1])=>-|\u2192/ |
||
191 | <-|\u2192/<=> return this.openingBracketBlock(session, match[1], row, i);=>-|\u2192/ |
||
192 | |||
193 | <-|\u2192/<=> var range = session.getCommentFoldRange(row, i + match[0].length, 1);=>-|\u2192/ |
||
194 | |||
195 | <-|\u2192/<=> if (range && !range.isMultiLine()) {=>-|\u2192/ |
||
196 | <-|\u2192/<=> if (forceMultiline) {=>-|\u2192/ |
||
197 | <-|\u2192/<=> range = this.getSectionRange(session, row);=>-|\u2192/ |
||
198 | <-|\u2192/<=> } else if (foldStyle != "all")=>-|\u2192/ |
||
199 | <-|\u2192/<=> range = null;=>-|\u2192/ |
||
200 | <-|\u2192/<=> }=>-|\u2192/ |
||
201 | |||
202 | <-|\u2192/<=> return range;=>-|\u2192/ |
||
203 | <-|\u2192/<=> }=>-|\u2192/ |
||
204 | |||
205 | <-|\u2192/<=> if (foldStyle === "markbegin")=>-|\u2192/ |
||
206 | <-|\u2192/<=> return;=>-|\u2192/ |
||
207 | |||
208 | <-|\u2192/<=> var match = line.match(this.foldingStopMarker);=>-|\u2192/ |
||
209 | <-|\u2192/<=> if (match) {=>-|\u2192/ |
||
210 | <-|\u2192/<=> var i = match.index + match[0].length;=>-|\u2192/ |
||
211 | |||
212 | <-|\u2192/<=> if (match[1])=>-|\u2192/ |
||
213 | <-|\u2192/<=> return this.closingBracketBlock(session, match[1], row, i);=>-|\u2192/ |
||
214 | |||
215 | <-|\u2192/<=> return session.getCommentFoldRange(row, i, -1);=>-|\u2192/ |
||
216 | <-|\u2192/<=> }=>-|\u2192/ |
||
217 | <-|\u2192/<=> };=>-|\u2192/ |
||
218 | |||
219 | <-|\u2192/<=> this.getSectionRange = function(session, row) {=>-|\u2192/ |
||
220 | <-|\u2192/<=> var line = session.getLine(row);=>-|\u2192/ |
||
221 | <-|\u2192/<=> var startIndent = line.search(/\S/);=>-|\u2192/ |
||
222 | <-|\u2192/<=> var startRow = row;=>-|\u2192/ |
||
223 | <-|\u2192/<=> var startColumn = line.length;=>-|\u2192/ |
||
224 | <-|\u2192/<=> row = row + 1;=>-|\u2192/ |
||
225 | <-|\u2192/<=> var endRow = row;=>-|\u2192/ |
||
226 | <-|\u2192/<=> var maxRow = session.getLength();=>-|\u2192/ |
||
227 | <-|\u2192/<=> while (++row < maxRow) {=>-|\u2192/ |
||
228 | <-|\u2192/<=> line = session.getLine(row);=>-|\u2192/ |
||
229 | <-|\u2192/<=> var indent = line.search(/\S/);=>-|\u2192/ |
||
230 | <-|\u2192/<=> if (indent === -1)=>-|\u2192/ |
||
231 | <-|\u2192/<=> continue;=>-|\u2192/ |
||
232 | <-|\u2192/<=> if (startIndent > indent)=>-|\u2192/ |
||
233 | <-|\u2192/<=> break;=>-|\u2192/ |
||
234 | <-|\u2192/<=> var subRange = this.getFoldWidgetRange(session, "all", row);=>-|\u2192/ |
||
235 | |||
236 | <-|\u2192/<=> if (subRange) {=>-|\u2192/ |
||
237 | <-|\u2192/<=> if (subRange.start.row <= startRow) {=>-|\u2192/ |
||
238 | <-|\u2192/<=> break;=>-|\u2192/ |
||
239 | <-|\u2192/<=> } else if (subRange.isMultiLine()) {=>-|\u2192/ |
||
240 | <-|\u2192/<=> row = subRange.end.row;=>-|\u2192/ |
||
241 | <-|\u2192/<=> } else if (startIndent == indent) {=>-|\u2192/ |
||
242 | <-|\u2192/<=> break;=>-|\u2192/ |
||
243 | <-|\u2192/<=> }=>-|\u2192/ |
||
244 | <-|\u2192/<=> }=>-|\u2192/ |
||
245 | <-|\u2192/<=> endRow = row;=>-|\u2192/ |
||
246 | <-|\u2192/<=> }=>-|\u2192/ |
||
247 | |||
248 | <-|\u2192/<=> return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);=>-|\u2192/ |
||
249 | <-|\u2192/<=> };=>-|\u2192/ |
||
250 | <-|\u2192/<=> this.getCommentRegionBlock = function(session, line, row) {=>-|\u2192/ |
||
251 | <-|\u2192/<=> var startColumn = line.search(/\s*$/);=>-|\u2192/ |
||
252 | <-|\u2192/<=> var maxRow = session.getLength();=>-|\u2192/ |
||
253 | <-|\u2192/<=> var startRow = row;=>-|\u2192/ |
||
254 | |||
255 | <-|\u2192/<=> var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;=>-|\u2192/ |
||
256 | <-|\u2192/<=> var depth = 1;=>-|\u2192/ |
||
257 | <-|\u2192/<=> while (++row < maxRow) {=>-|\u2192/ |
||
258 | <-|\u2192/<=> line = session.getLine(row);=>-|\u2192/ |
||
259 | <-|\u2192/<=> var m = re.exec(line);=>-|\u2192/ |
||
260 | <-|\u2192/<=> if (!m) continue;=>-|\u2192/ |
||
261 | <-|\u2192/<=> if (m[1]) depth--;=>-|\u2192/ |
||
262 | <-|\u2192/<=> else depth++;=>-|\u2192/ |
||
263 | |||
264 | <-|\u2192/<=> if (!depth) break;=>-|\u2192/ |
||
265 | <-|\u2192/<=> }=>-|\u2192/ |
||
266 | |||
267 | <-|\u2192/<=> var endRow = row;=>-|\u2192/ |
||
268 | <-|\u2192/<=> if (endRow > startRow) {=>-|\u2192/ |
||
269 | <-|\u2192/<=> return new Range(startRow, startColumn, endRow, line.length);=>-|\u2192/ |
||
270 | <-|\u2192/<=> }=>-|\u2192/ |
||
271 | <-|\u2192/<=> };=>-|\u2192/ |
||
272 | |||
273 | <-|\u2192/<=>}).call(FoldMode.prototype);=>-|\u2192/ |
||
274 | |||
275 | <-|\u2192/<=>});=>-|\u2192/ |
||
276 | |||
277 | <-|\u2192/<=>ace.define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {=>-|\u2192/ |
||
278 | <-|\u2192/<=>"use strict";=>-|\u2192/ |
||
279 | |||
280 | <-|\u2192/<=>var oop = require("../lib/oop");=>-|\u2192/ |
||
281 | <-|\u2192/<=>var TextMode = require("./text").Mode;=>-|\u2192/ |
||
282 | <-|\u2192/<=>var HighlightRules = require("./elm_highlight_rules").ElmHighlightRules;=>-|\u2192/ |
||
283 | <-|\u2192/<=>var FoldMode = require("./folding/cstyle").FoldMode;=>-|\u2192/ |
||
284 | |||
285 | <-|\u2192/<=>var Mode = function() {=>-|\u2192/ |
||
286 | <-|\u2192/<=> this.HighlightRules = HighlightRules;=>-|\u2192/ |
||
287 | <-|\u2192/<=> this.foldingRules = new FoldMode();=>-|\u2192/ |
||
288 | <-|\u2192/<=> this.$behaviour = this.$defaultBehaviour;=>-|\u2192/ |
||
289 | <-|\u2192/<=>};=>-|\u2192/ |
||
290 | <-|\u2192/<=>oop.inherits(Mode, TextMode);=>-|\u2192/ |
||
291 | |||
292 | <-|\u2192/<=>(function() {=>-|\u2192/ |
||
293 | <-|\u2192/<=> this.lineCommentStart = "--";=>-|\u2192/ |
||
294 | <-|\u2192/<=> this.blockComment = {start: "{-", end: "-}", nestable: true};=>-|\u2192/ |
||
295 | <-|\u2192/<=> this.$id = "ace/mode/elm";=>-|\u2192/ |
||
296 | <-|\u2192/<=>}).call(Mode.prototype);=>-|\u2192/ |
||
297 | |||
298 | <-|\u2192/<=>exports.Mode = Mode;=>-|\u2192/ |
||
299 | <-|\u2192/<=>});=>-|\u2192/ |