corrade-nucleus-nucleons – Blame information for rev 20
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
20 | office | 1 | define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { |
2 | "use strict"; |
||
3 | |||
4 | var oop = require("../lib/oop"); |
||
5 | var lang = require("../lib/lang"); |
||
6 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; |
||
7 | |||
8 | var ScssHighlightRules = function() { |
||
9 | |||
10 | var properties = lang.arrayToMap( (function () { |
||
11 | |||
12 | var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); |
||
13 | |||
14 | var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + |
||
15 | "background-size|binding|border-bottom-colors|border-left-colors|" + |
||
16 | "border-right-colors|border-top-colors|border-end|border-end-color|" + |
||
17 | "border-end-style|border-end-width|border-image|border-start|" + |
||
18 | "border-start-color|border-start-style|border-start-width|box-align|" + |
||
19 | "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + |
||
20 | "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + |
||
21 | "column-rule-width|column-rule-style|column-rule-color|float-edge|" + |
||
22 | "font-feature-settings|font-language-override|force-broken-image-icon|" + |
||
23 | "image-region|margin-end|margin-start|opacity|outline|outline-color|" + |
||
24 | "outline-offset|outline-radius|outline-radius-bottomleft|" + |
||
25 | "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + |
||
26 | "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + |
||
27 | "tab-size|text-blink|text-decoration-color|text-decoration-line|" + |
||
28 | "text-decoration-style|transform|transform-origin|transition|" + |
||
29 | "transition-delay|transition-duration|transition-property|" + |
||
30 | "transition-timing-function|user-focus|user-input|user-modify|user-select|" + |
||
31 | "window-shadow|border-radius").split("|"); |
||
32 | |||
33 | var properties = ("azimuth|background-attachment|background-color|background-image|" + |
||
34 | "background-position|background-repeat|background|border-bottom-color|" + |
||
35 | "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + |
||
36 | "border-color|border-left-color|border-left-style|border-left-width|" + |
||
37 | "border-left|border-right-color|border-right-style|border-right-width|" + |
||
38 | "border-right|border-spacing|border-style|border-top-color|" + |
||
39 | "border-top-style|border-top-width|border-top|border-width|border|bottom|" + |
||
40 | "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + |
||
41 | "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + |
||
42 | "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + |
||
43 | "font-stretch|font-style|font-variant|font-weight|font|height|left|" + |
||
44 | "letter-spacing|line-height|list-style-image|list-style-position|" + |
||
45 | "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + |
||
46 | "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + |
||
47 | "min-width|opacity|orphans|outline-color|" + |
||
48 | "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + |
||
49 | "padding-left|padding-right|padding-top|padding|page-break-after|" + |
||
50 | "page-break-before|page-break-inside|page|pause-after|pause-before|" + |
||
51 | "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + |
||
52 | "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + |
||
53 | "stress|table-layout|text-align|text-decoration|text-indent|" + |
||
54 | "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + |
||
55 | "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + |
||
56 | "z-index").split("|"); |
||
57 | var ret = []; |
||
58 | for (var i=0, ln=browserPrefix.length; i<ln; i++) { |
||
59 | Array.prototype.push.apply( |
||
60 | ret, |
||
61 | (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|")) |
||
62 | ); |
||
63 | } |
||
64 | Array.prototype.push.apply(ret, prefixProperties); |
||
65 | Array.prototype.push.apply(ret, properties); |
||
66 | |||
67 | return ret; |
||
68 | |||
69 | })() ); |
||
70 | |||
71 | |||
72 | |||
73 | var functions = lang.arrayToMap( |
||
74 | ("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" + |
||
75 | "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" + |
||
76 | "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" + |
||
77 | "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" + |
||
78 | "scale_color|transparentize|type_of|unit|unitless|unqoute").split("|") |
||
79 | ); |
||
80 | |||
81 | var constants = lang.arrayToMap( |
||
82 | ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" + |
||
83 | "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" + |
||
84 | "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" + |
||
85 | "decimal-leading-zero|decimal|default|disabled|disc|" + |
||
86 | "distribute-all-lines|distribute-letter|distribute-space|" + |
||
87 | "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" + |
||
88 | "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" + |
||
89 | "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" + |
||
90 | "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" + |
||
91 | "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" + |
||
92 | "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" + |
||
93 | "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" + |
||
94 | "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" + |
||
95 | "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" + |
||
96 | "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" + |
||
97 | "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" + |
||
98 | "solid|square|static|strict|super|sw-resize|table-footer-group|" + |
||
99 | "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" + |
||
100 | "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" + |
||
101 | "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" + |
||
102 | "zero").split("|") |
||
103 | ); |
||
104 | |||
105 | var colors = lang.arrayToMap( |
||
106 | ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" + |
||
107 | "purple|red|silver|teal|white|yellow").split("|") |
||
108 | ); |
||
109 | |||
110 | var keywords = lang.arrayToMap( |
||
111 | ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|") |
||
112 | ) |
||
113 | |||
114 | var tags = lang.arrayToMap( |
||
115 | ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + |
||
116 | "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + |
||
117 | "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + |
||
118 | "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + |
||
119 | "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + |
||
120 | "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + |
||
121 | "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + |
||
122 | "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + |
||
123 | "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|") |
||
124 | ); |
||
125 | |||
126 | var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; |
||
127 | |||
128 | this.$rules = { |
||
129 | "start" : [ |
||
130 | { |
||
131 | token : "comment", |
||
132 | regex : "\\/\\/.*$" |
||
133 | }, |
||
134 | { |
||
135 | token : "comment", // multi line comment |
||
136 | regex : "\\/\\*", |
||
137 | next : "comment" |
||
138 | }, { |
||
139 | token : "string", // single line |
||
140 | regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' |
||
141 | }, { |
||
142 | token : "string", // multi line string start |
||
143 | regex : '["].*\\\\$', |
||
144 | next : "qqstring" |
||
145 | }, { |
||
146 | token : "string", // single line |
||
147 | regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" |
||
148 | }, { |
||
149 | token : "string", // multi line string start |
||
150 | regex : "['].*\\\\$", |
||
151 | next : "qstring" |
||
152 | }, { |
||
153 | token : "constant.numeric", |
||
154 | regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)" |
||
155 | }, { |
||
156 | token : "constant.numeric", // hex6 color |
||
157 | regex : "#[a-f0-9]{6}" |
||
158 | }, { |
||
159 | token : "constant.numeric", // hex3 color |
||
160 | regex : "#[a-f0-9]{3}" |
||
161 | }, { |
||
162 | token : "constant.numeric", |
||
163 | regex : numRe |
||
164 | }, { |
||
165 | token : ["support.function", "string", "support.function"], |
||
166 | regex : "(url\\()(.*)(\\))" |
||
167 | }, { |
||
168 | token : function(value) { |
||
169 | if (properties.hasOwnProperty(value.toLowerCase())) |
||
170 | return "support.type"; |
||
171 | if (keywords.hasOwnProperty(value)) |
||
172 | return "keyword"; |
||
173 | else if (constants.hasOwnProperty(value)) |
||
174 | return "constant.language"; |
||
175 | else if (functions.hasOwnProperty(value)) |
||
176 | return "support.function"; |
||
177 | else if (colors.hasOwnProperty(value.toLowerCase())) |
||
178 | return "support.constant.color"; |
||
179 | else if (tags.hasOwnProperty(value.toLowerCase())) |
||
180 | return "variable.language"; |
||
181 | else |
||
182 | return "text"; |
||
183 | }, |
||
184 | regex : "\\-?[@a-z_][@a-z0-9_\\-]*" |
||
185 | }, { |
||
186 | token : "variable", |
||
187 | regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b" |
||
188 | }, { |
||
189 | token: "variable.language", |
||
190 | regex: "#[a-z0-9-_]+" |
||
191 | }, { |
||
192 | token: "variable.language", |
||
193 | regex: "\\.[a-z0-9-_]+" |
||
194 | }, { |
||
195 | token: "variable.language", |
||
196 | regex: ":[a-z0-9-_]+" |
||
197 | }, { |
||
198 | token: "constant", |
||
199 | regex: "[a-z0-9-_]+" |
||
200 | }, { |
||
201 | token : "keyword.operator", |
||
202 | regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" |
||
203 | }, { |
||
204 | token : "paren.lparen", |
||
205 | regex : "[[({]" |
||
206 | }, { |
||
207 | token : "paren.rparen", |
||
208 | regex : "[\\])}]" |
||
209 | }, { |
||
210 | token : "text", |
||
211 | regex : "\\s+" |
||
212 | }, { |
||
213 | caseInsensitive: true |
||
214 | } |
||
215 | ], |
||
216 | "comment" : [ |
||
217 | { |
||
218 | token : "comment", // closing comment |
||
219 | regex : ".*?\\*\\/", |
||
220 | next : "start" |
||
221 | }, { |
||
222 | token : "comment", // comment spanning whole line |
||
223 | regex : ".+" |
||
224 | } |
||
225 | ], |
||
226 | "qqstring" : [ |
||
227 | { |
||
228 | token : "string", |
||
229 | regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', |
||
230 | next : "start" |
||
231 | }, { |
||
232 | token : "string", |
||
233 | regex : '.+' |
||
234 | } |
||
235 | ], |
||
236 | "qstring" : [ |
||
237 | { |
||
238 | token : "string", |
||
239 | regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", |
||
240 | next : "start" |
||
241 | }, { |
||
242 | token : "string", |
||
243 | regex : '.+' |
||
244 | } |
||
245 | ] |
||
246 | }; |
||
247 | }; |
||
248 | |||
249 | oop.inherits(ScssHighlightRules, TextHighlightRules); |
||
250 | |||
251 | exports.ScssHighlightRules = ScssHighlightRules; |
||
252 | |||
253 | }); |
||
254 | |||
255 | define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module) { |
||
256 | "use strict"; |
||
257 | |||
258 | var oop = require("../lib/oop"); |
||
259 | var lang = require("../lib/lang"); |
||
260 | var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; |
||
261 | |||
262 | var SassHighlightRules = function() { |
||
263 | ScssHighlightRules.call(this); |
||
264 | var start = this.$rules.start; |
||
265 | if (start[1].token == "comment") { |
||
266 | start.splice(1, 1, { |
||
267 | onMatch: function(value, currentState, stack) { |
||
268 | stack.unshift(this.next, -1, value.length - 2, currentState); |
||
269 | return "comment"; |
||
270 | }, |
||
271 | regex: /^\s*\/\*/, |
||
272 | next: "comment" |
||
273 | }, { |
||
274 | token: "error.invalid", |
||
275 | regex: "/\\*|[{;}]" |
||
276 | }, { |
||
277 | token: "support.type", |
||
278 | regex: /^\s*:[\w\-]+\s/ |
||
279 | }); |
||
280 | |||
281 | this.$rules.comment = [ |
||
282 | {regex: /^\s*/, onMatch: function(value, currentState, stack) { |
||
283 | if (stack[1] === -1) |
||
284 | stack[1] = Math.max(stack[2], value.length - 1); |
||
285 | if (value.length <= stack[1]) {stack.shift();stack.shift();stack.shift(); |
||
286 | this.next = stack.shift(); |
||
287 | return "text"; |
||
288 | } else { |
||
289 | this.next = ""; |
||
290 | return "comment"; |
||
291 | } |
||
292 | }, next: "start"}, |
||
293 | {defaultToken: "comment"} |
||
294 | ] |
||
295 | } |
||
296 | }; |
||
297 | |||
298 | oop.inherits(SassHighlightRules, ScssHighlightRules); |
||
299 | |||
300 | exports.SassHighlightRules = SassHighlightRules; |
||
301 | |||
302 | }); |
||
303 | |||
304 | define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { |
||
305 | "use strict"; |
||
306 | |||
307 | var oop = require("../../lib/oop"); |
||
308 | var BaseFoldMode = require("./fold_mode").FoldMode; |
||
309 | var Range = require("../../range").Range; |
||
310 | |||
311 | var FoldMode = exports.FoldMode = function() {}; |
||
312 | oop.inherits(FoldMode, BaseFoldMode); |
||
313 | |||
314 | (function() { |
||
315 | |||
316 | this.getFoldWidgetRange = function(session, foldStyle, row) { |
||
317 | var range = this.indentationBlock(session, row); |
||
318 | if (range) |
||
319 | return range; |
||
320 | |||
321 | var re = /\S/; |
||
322 | var line = session.getLine(row); |
||
323 | var startLevel = line.search(re); |
||
324 | if (startLevel == -1 || line[startLevel] != "#") |
||
325 | return; |
||
326 | |||
327 | var startColumn = line.length; |
||
328 | var maxRow = session.getLength(); |
||
329 | var startRow = row; |
||
330 | var endRow = row; |
||
331 | |||
332 | while (++row < maxRow) { |
||
333 | line = session.getLine(row); |
||
334 | var level = line.search(re); |
||
335 | |||
336 | if (level == -1) |
||
337 | continue; |
||
338 | |||
339 | if (line[level] != "#") |
||
340 | break; |
||
341 | |||
342 | endRow = row; |
||
343 | } |
||
344 | |||
345 | if (endRow > startRow) { |
||
346 | var endColumn = session.getLine(endRow).length; |
||
347 | return new Range(startRow, startColumn, endRow, endColumn); |
||
348 | } |
||
349 | }; |
||
350 | this.getFoldWidget = function(session, foldStyle, row) { |
||
351 | var line = session.getLine(row); |
||
352 | var indent = line.search(/\S/); |
||
353 | var next = session.getLine(row + 1); |
||
354 | var prev = session.getLine(row - 1); |
||
355 | var prevIndent = prev.search(/\S/); |
||
356 | var nextIndent = next.search(/\S/); |
||
357 | |||
358 | if (indent == -1) { |
||
359 | session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; |
||
360 | return ""; |
||
361 | } |
||
362 | if (prevIndent == -1) { |
||
363 | if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { |
||
364 | session.foldWidgets[row - 1] = ""; |
||
365 | session.foldWidgets[row + 1] = ""; |
||
366 | return "start"; |
||
367 | } |
||
368 | } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { |
||
369 | if (session.getLine(row - 2).search(/\S/) == -1) { |
||
370 | session.foldWidgets[row - 1] = "start"; |
||
371 | session.foldWidgets[row + 1] = ""; |
||
372 | return ""; |
||
373 | } |
||
374 | } |
||
375 | |||
376 | if (prevIndent!= -1 && prevIndent < indent) |
||
377 | session.foldWidgets[row - 1] = "start"; |
||
378 | else |
||
379 | session.foldWidgets[row - 1] = ""; |
||
380 | |||
381 | if (indent < nextIndent) |
||
382 | return "start"; |
||
383 | else |
||
384 | return ""; |
||
385 | }; |
||
386 | |||
387 | }).call(FoldMode.prototype); |
||
388 | |||
389 | }); |
||
390 | |||
391 | define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { |
||
392 | "use strict"; |
||
393 | |||
394 | var oop = require("../lib/oop"); |
||
395 | var TextMode = require("./text").Mode; |
||
396 | var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules; |
||
397 | var FoldMode = require("./folding/coffee").FoldMode; |
||
398 | |||
399 | var Mode = function() { |
||
400 | this.HighlightRules = SassHighlightRules; |
||
401 | this.foldingRules = new FoldMode(); |
||
402 | this.$behaviour = this.$defaultBehaviour; |
||
403 | }; |
||
404 | oop.inherits(Mode, TextMode); |
||
405 | |||
406 | (function() { |
||
407 | this.lineCommentStart = "//"; |
||
408 | this.$id = "ace/mode/sass"; |
||
409 | }).call(Mode.prototype); |
||
410 | |||
411 | exports.Mode = Mode; |
||
412 | |||
413 | }); |