corrade-nucleus-nucleons – Blame information for rev 20

Subversion Repositories:
Rev:
Rev Author Line No. Line
20 office 1 ace.define("ace/mode/cirru_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 var CirruHighlightRules = function() {
7 this.$rules = {
8 start: [{
9 token: 'constant.numeric',
10 regex: /[\d\.]+/
11 }, {
12 token: 'comment.line.double-dash',
13 regex: /--/,
14 next: 'comment'
15 }, {
16 token: 'storage.modifier',
17 regex: /\(/
18 }, {
19 token: 'storage.modifier',
20 regex: /,/,
21 next: 'line'
22 }, {
23 token: 'support.function',
24 regex: /[^\(\)"\s]+/,
25 next: 'line'
26 }, {
27 token: 'string.quoted.double',
28 regex: /"/,
29 next: 'string'
30 }, {
31 token: 'storage.modifier',
32 regex: /\)/
33 }],
34 comment: [{
35 token: 'comment.line.double-dash',
36 regex: / +[^\n]+/,
37 next: 'start'
38 }],
39 string: [{
40 token: 'string.quoted.double',
41 regex: /"/,
42 next: 'line'
43 }, {
44 token: 'constant.character.escape',
45 regex: /\\/,
46 next: 'escape'
47 }, {
48 token: 'string.quoted.double',
49 regex: /[^\\"]+/
50 }],
51 escape: [{
52 token: 'constant.character.escape',
53 regex: /./,
54 next: 'string'
55 }],
56 line: [{
57 token: 'constant.numeric',
58 regex: /[\d\.]+/
59 }, {
60 token: 'markup.raw',
61 regex: /^\s*/,
62 next: 'start'
63 }, {
64 token: 'storage.modifier',
65 regex: /\$/,
66 next: 'start'
67 }, {
68 token: 'variable.parameter',
69 regex: /[^\(\)"\s]+/
70 }, {
71 token: 'storage.modifier',
72 regex: /\(/,
73 next: 'start'
74 }, {
75 token: 'storage.modifier',
76 regex: /\)/
77 }, {
78 token: 'markup.raw',
79 regex: /^ */,
80 next: 'start'
81 }, {
82 token: 'string.quoted.double',
83 regex: /"/,
84 next: 'string'
85 }]
86 }
87  
88 };
89  
90 oop.inherits(CirruHighlightRules, TextHighlightRules);
91  
92 exports.CirruHighlightRules = CirruHighlightRules;
93 });
94  
95 ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
96 "use strict";
97  
98 var oop = require("../../lib/oop");
99 var BaseFoldMode = require("./fold_mode").FoldMode;
100 var Range = require("../../range").Range;
101  
102 var FoldMode = exports.FoldMode = function() {};
103 oop.inherits(FoldMode, BaseFoldMode);
104  
105 (function() {
106  
107 this.getFoldWidgetRange = function(session, foldStyle, row) {
108 var range = this.indentationBlock(session, row);
109 if (range)
110 return range;
111  
112 var re = /\S/;
113 var line = session.getLine(row);
114 var startLevel = line.search(re);
115 if (startLevel == -1 || line[startLevel] != "#")
116 return;
117  
118 var startColumn = line.length;
119 var maxRow = session.getLength();
120 var startRow = row;
121 var endRow = row;
122  
123 while (++row < maxRow) {
124 < maxRow) { line = session.getLine(row);
125 < maxRow) { var level = line.search(re);
126  
127 < maxRow) { if (level == -1)
128 < maxRow) { continue;
129  
130 < maxRow) { if (line[level] != "#")
131 < maxRow) { break;
132  
133 < maxRow) { endRow = row;
134 < maxRow) { }
135  
136 < maxRow) { if (endRow > startRow) {
137 < maxRow) { var endColumn = session.getLine(endRow).length;
138 < maxRow) { return new Range(startRow, startColumn, endRow, endColumn);
139 < maxRow) { }
140 < maxRow) { };
141 < maxRow) { this.getFoldWidget = function(session, foldStyle, row) {
142 < maxRow) { var line = session.getLine(row);
143 < maxRow) { var indent = line.search(/\S/);
144 < maxRow) { var next = session.getLine(row + 1);
145 < maxRow) { var prev = session.getLine(row - 1);
146 < maxRow) { var prevIndent = prev.search(/\S/);
147 < maxRow) { var nextIndent = next.search(/\S/);
148  
149 < maxRow) { if (indent == -1) {
150 < maxRow) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
151 < maxRow) {< nextIndent ? "start" : ""; return "";
152 < maxRow) {< nextIndent ? "start" : ""; }
153 < maxRow) {< nextIndent ? "start" : ""; if (prevIndent == -1) {
154 < maxRow) {< nextIndent ? "start" : ""; if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
155 < maxRow) {< nextIndent ? "start" : ""; session.foldWidgets[row - 1] = "";
156 < maxRow) {< nextIndent ? "start" : ""; session.foldWidgets[row + 1] = "";
157 < maxRow) {< nextIndent ? "start" : ""; return "start";
158 < maxRow) {< nextIndent ? "start" : ""; }
159 < maxRow) {< nextIndent ? "start" : ""; } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
160 < maxRow) {< nextIndent ? "start" : ""; if (session.getLine(row - 2).search(/\S/) == -1) {
161 < maxRow) {< nextIndent ? "start" : ""; session.foldWidgets[row - 1] = "start";
162 < maxRow) {< nextIndent ? "start" : ""; session.foldWidgets[row + 1] = "";
163 < maxRow) {< nextIndent ? "start" : ""; return "";
164 < maxRow) {< nextIndent ? "start" : ""; }
165 < maxRow) {< nextIndent ? "start" : ""; }
166  
167 < maxRow) {< nextIndent ? "start" : ""; if (prevIndent!= -1 && prevIndent < indent)
168 < maxRow) {< nextIndent ? "start" : "";< indent) session.foldWidgets[row - 1] = "start";
169 < maxRow) {< nextIndent ? "start" : "";< indent) else
170 < maxRow) {< nextIndent ? "start" : "";< indent) session.foldWidgets[row - 1] = "";
171  
172 < maxRow) {< nextIndent ? "start" : "";< indent) if (indent < nextIndent)
173 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent) return "start";
174 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent) else
175 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent) return "";
176 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent) };
177  
178 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)}).call(FoldMode.prototype);
179  
180 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)});
181  
182 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)ace.define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
183 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)"use strict";
184  
185 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)var oop = require("../lib/oop");
186 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)var TextMode = require("./text").Mode;
187 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)var CirruHighlightRules = require("./cirru_highlight_rules").CirruHighlightRules;
188 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)var CoffeeFoldMode = require("./folding/coffee").FoldMode;
189  
190 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)var Mode = function() {
191 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent) this.HighlightRules = CirruHighlightRules;
192 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent) this.foldingRules = new CoffeeFoldMode();
193 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent) this.$behaviour = this.$defaultBehaviour;
194 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)};
195 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)oop.inherits(Mode, TextMode);
196  
197 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)(function() {
198 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent) this.lineCommentStart = "--";
199 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent) this.$id = "ace/mode/cirru";
200 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)}).call(Mode.prototype);
201  
202 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)exports.Mode = Mode;
203 < maxRow) {< nextIndent ? "start" : "";< indent)< nextIndent)});