corrade-nucleus-nucleons – Blame information for rev 2

Subversion Repositories:
Rev:
Rev Author Line No. Line
2 office 1 define("ace/mode/doc_comment_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 DocCommentHighlightRules = function() {
8 this.$rules = {
9 "start" : [ {
10 token : "comment.doc.tag",
11 regex : "@[\\w\\d_]+" // TODO: fix email addresses
12 },
13 DocCommentHighlightRules.getTagRule(),
14 {
15 defaultToken : "comment.doc",
16 caseInsensitive: true
17 }]
18 };
19 };
20  
21 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
22  
23 DocCommentHighlightRules.getTagRule = function(start) {
24 return {
25 token : "comment.doc.tag.storage.type",
26 regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
27 };
28 }
29  
30 DocCommentHighlightRules.getStartRule = function(start) {
31 return {
32 token : "comment.doc", // doc comment
33 regex : "\\/\\*(?=\\*)",
34 next : start
35 };
36 };
37  
38 DocCommentHighlightRules.getEndRule = function (start) {
39 return {
40 token : "comment.doc", // closing comment
41 regex : "\\*\\/",
42 next : start
43 };
44 };
45  
46  
47 exports.DocCommentHighlightRules = DocCommentHighlightRules;
48  
49 });
50  
51 define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
52 "use strict";
53  
54 var oop = require("../lib/oop");
55 var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
56 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
57  
58 var JavaHighlightRules = function() {
59 var keywords = (
60 "abstract|continue|for|new|switch|" +
61 "assert|default|goto|package|synchronized|" +
62 "boolean|do|if|private|this|" +
63 "break|double|implements|protected|throw|" +
64 "byte|else|import|public|throws|" +
65 "case|enum|instanceof|return|transient|" +
66 "catch|extends|int|short|try|" +
67 "char|final|interface|static|void|" +
68 "class|finally|long|strictfp|volatile|" +
69 "const|float|native|super|while"
70 );
71  
72 var buildinConstants = ("null|Infinity|NaN|undefined");
73  
74  
75 var langClasses = (
76 "AbstractMethodError|AssertionError|ClassCircularityError|"+
77 "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
78 "ExceptionInInitializerError|IllegalAccessError|"+
79 "IllegalThreadStateException|InstantiationError|InternalError|"+
80 "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
81 "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
82 "SuppressWarnings|TypeNotPresentException|UnknownError|"+
83 "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
84 "InstantiationException|IndexOutOfBoundsException|"+
85 "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
86 "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
87 "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
88 "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
89 "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
90 "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
91 "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
92 "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
93 "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
94 "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
95 "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
96 "ArrayStoreException|ClassCastException|LinkageError|"+
97 "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
98 "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
99 "Cloneable|Class|CharSequence|Comparable|String|Object"
100 );
101  
102 var keywordMapper = this.createKeywordMapper({
103 "variable.language": "this",
104 "keyword": keywords,
105 "constant.language": buildinConstants,
106 "support.function": langClasses
107 }, "identifier");
108  
109 this.$rules = {
110 "start" : [
111 {
112 token : "comment",
113 regex : "\\/\\/.*$"
114 },
115 DocCommentHighlightRules.getStartRule("doc-start"),
116 {
117 token : "comment", // multi line comment
118 regex : "\\/\\*",
119 next : "comment"
120 }, {
121 token : "string", // single line
122 regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
123 }, {
124 token : "string", // single line
125 regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
126 }, {
127 token : "constant.numeric", // hex
128 regex : /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
129 }, {
130 token : "constant.numeric", // float
131 regex : /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/
132 }, {
133 token : "constant.language.boolean",
134 regex : "(?:true|false)\\b"
135 }, {
136 token : keywordMapper,
137 regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
138 }, {
139 token : "keyword.operator",
140 regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
141 }, {
142 token : "lparen",
143 regex : "[[({]"
144 }, {
145 token : "rparen",
146 regex : "[\\])}]"
147 }, {
148 token : "text",
149 regex : "\\s+"
150 }
151 ],
152 "comment" : [
153 {
154 token : "comment", // closing comment
155 regex : ".*?\\*\\/",
156 next : "start"
157 }, {
158 token : "comment", // comment spanning whole line
159 regex : ".+"
160 }
161 ]
162 };
163  
164 this.embedRules(DocCommentHighlightRules, "doc-",
165 [ DocCommentHighlightRules.getEndRule("start") ]);
166 };
167  
168 oop.inherits(JavaHighlightRules, TextHighlightRules);
169  
170 exports.JavaHighlightRules = JavaHighlightRules;
171 });
172  
173 define("ace/mode/drools_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/java_highlight_rules","ace/mode/doc_comment_highlight_rules"], function(require, exports, module) {
174 "use strict";
175  
176 var oop = require("../lib/oop");
177 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
178 var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
179 var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
180  
181 var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
182 var packageIdentifierRe = "[a-zA-Z\\$_\u00a1-\uffff][\\.a-zA-Z\\d\\$_\u00a1-\uffff]*";
183  
184 var DroolsHighlightRules = function() {
185  
186 var keywords = ("date|effective|expires|lock|on|active|no|loop|auto|focus" +
187 "|activation|group|agenda|ruleflow|duration|timer|calendars|refract|direct" +
188 "|dialect|salience|enabled|attributes|extends|template" +
189 "|function|contains|matches|eval|excludes|soundslike" +
190 "|memberof|not|in|or|and|exists|forall|over|from|entry|point|accumulate|acc|collect" +
191 "|action|reverse|result|end|init|instanceof|extends|super|boolean|char|byte|short" +
192 "|int|long|float|double|this|void|class|new|case|final|if|else|for|while|do" +
193 "|default|try|catch|finally|switch|synchronized|return|throw|break|continue|assert" +
194 "|modify|static|public|protected|private|abstract|native|transient|volatile" +
195 "|strictfp|throws|interface|enum|implements|type|window|trait|no-loop|str"
196 );
197  
198 var langClasses = (
199 "AbstractMethodError|AssertionError|ClassCircularityError|"+
200 "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
201 "ExceptionInInitializerError|IllegalAccessError|"+
202 "IllegalThreadStateException|InstantiationError|InternalError|"+
203 "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
204 "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
205 "SuppressWarnings|TypeNotPresentException|UnknownError|"+
206 "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
207 "InstantiationException|IndexOutOfBoundsException|"+
208 "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
209 "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
210 "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
211 "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
212 "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
213 "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
214 "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
215 "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
216 "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
217 "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
218 "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
219 "ArrayStoreException|ClassCastException|LinkageError|"+
220 "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
221 "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
222 "Cloneable|Class|CharSequence|Comparable|String|Object"
223 );
224  
225 var keywordMapper = this.createKeywordMapper({
226 "variable.language": "this",
227 "keyword": keywords,
228 "constant.language": "null",
229 "support.class" : langClasses,
230 "support.function" : "retract|update|modify|insert"
231 }, "identifier");
232  
233 var stringRules = function() {
234 return [{
235 token : "string", // single line
236 regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
237 }, {
238 token : "string", // single line
239 regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
240 }];
241 };
242  
243  
244 var basicPreRules = function(blockCommentRules) {
245 return [{
246 token : "comment",
247 regex : "\\/\\/.*$"
248 },
249 DocCommentHighlightRules.getStartRule("doc-start"),
250 {
251 token : "comment", // multi line comment
252 regex : "\\/\\*",
253 next : blockCommentRules
254 }, {
255 token : "constant.numeric", // hex
256 regex : "0[xX][0-9a-fA-F]+\\b"
257 }, {
258 token : "constant.numeric", // float
259 regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
260 }, {
261 token : "constant.language.boolean",
262 regex : "(?:true|false)\\b"
263 }];
264 };
265  
266 var blockCommentRules = function(returnRule) {
267 return [
268 {
269 token : "comment.block", // closing comment
270 regex : ".*?\\*\\/",
271 next : returnRule
272 }, {
273 token : "comment.block", // comment spanning whole line
274 regex : ".+"
275 }
276 ];
277 }
278  
279 var basicPostRules = function() {
280 return [{
281 token : keywordMapper,
282 regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
283 }, {
284 token : "keyword.operator",
285 regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
286 }, {
287 token : "lparen",
288 regex : "[[({]"
289 }, {
290 token : "rparen",
291 regex : "[\\])}]"
292 }, {
293 token : "text",
294 regex : "\\s+"
295 }];
296 };
297  
298  
299 this.$rules = {
300 "start" : [].concat(basicPreRules("block.comment"), [
301 {
302 token : "entity.name.type",
303 regex : "@[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
304 }, {
305 token : ["keyword","text","entity.name.type"],
306 regex : "(package)(\\s+)(" + packageIdentifierRe +")"
307 }, {
308 token : ["keyword","text","keyword","text","entity.name.type"],
309 regex : "(import)(\\s+)(function)(\\s+)(" + packageIdentifierRe +")"
310 }, {
311 token : ["keyword","text","entity.name.type"],
312 regex : "(import)(\\s+)(" + packageIdentifierRe +")"
313 }, {
314 token : ["keyword","text","entity.name.type","text","variable"],
315 regex : "(global)(\\s+)(" + packageIdentifierRe +")(\\s+)(" + identifierRe +")"
316 }, {
317 token : ["keyword","text","keyword","text","entity.name.type"],
318 regex : "(declare)(\\s+)(trait)(\\s+)(" + identifierRe +")"
319 }, {
320 token : ["keyword","text","entity.name.type"],
321 regex : "(declare)(\\s+)(" + identifierRe +")"
322 }, {
323 token : ["keyword","text","entity.name.type"],
324 regex : "(extends)(\\s+)(" + packageIdentifierRe +")"
325 }, {
326 token : ["keyword","text"],
327 regex : "(rule)(\\s+)",
328 next : "asset.name"
329 }],
330 stringRules(),
331 [{
332 token : ["variable.other","text","text"],
333 regex : "(" + identifierRe + ")(\\s*)(:)"
334 }, {
335 token : ["keyword","text"],
336 regex : "(query)(\\s+)",
337 next : "asset.name"
338 }, {
339 token : ["keyword","text"],
340 regex : "(when)(\\s*)"
341 }, {
342 token : ["keyword","text"],
343 regex : "(then)(\\s*)",
344 next : "java-start"
345 }, {
346 token : "paren.lparen",
347 regex : /[\[({]/
348 }, {
349 token : "paren.rparen",
350 regex : /[\])}]/
351 }], basicPostRules()),
352 "block.comment" : blockCommentRules("start"),
353 "asset.name" : [
354 {
355 token : "entity.name",
356 regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
357 }, {
358 token : "entity.name",
359 regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
360 }, {
361 token : "entity.name",
362 regex : identifierRe
363 }, {
364 regex: "",
365 token: "empty",
366 next: "start"
367 }]
368 };
369 this.embedRules(DocCommentHighlightRules, "doc-",
370 [ DocCommentHighlightRules.getEndRule("start") ]);
371  
372 this.embedRules(JavaHighlightRules, "java-", [
373 {
374 token : "support.function",
375 regex: "\\b(insert|modify|retract|update)\\b"
376 }, {
377 token : "keyword",
378 regex: "\\bend\\b",
379 next : "start"
380 }]);
381  
382 };
383  
384 oop.inherits(DroolsHighlightRules, TextHighlightRules);
385  
386 exports.DroolsHighlightRules = DroolsHighlightRules;
387 });
388  
389 define("ace/mode/folding/drools",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
390 "use strict";
391  
392 var oop = require("../../lib/oop");
393 var Range = require("../../range").Range;
394 var BaseFoldMode = require("./fold_mode").FoldMode;
395 var TokenIterator = require("../../token_iterator").TokenIterator;
396  
397 var FoldMode = exports.FoldMode = function() {};
398 oop.inherits(FoldMode, BaseFoldMode);
399  
400 (function() {
401 this.foldingStartMarker = /\b(rule|declare|query|when|then)\b/;
402 this.foldingStopMarker = /\bend\b/;
403  
404 this.getFoldWidgetRange = function(session, foldStyle, row) {
405 var line = session.getLine(row);
406 var match = line.match(this.foldingStartMarker);
407 if (match) {
408 var i = match.index;
409  
410 if (match[1]) {
411 var position = {row: row, column: line.length};
412 var iterator = new TokenIterator(session, position.row, position.column);
413 var seek = "end";
414 var token = iterator.getCurrentToken();
415 if (token.value == "when") {
416 seek = "then";
417 }
418 while (token) {
419 if (token.value == seek) {
420 return Range.fromPoints(position ,{
421 row: iterator.getCurrentTokenRow(),
422 column: iterator.getCurrentTokenColumn()
423 });
424 }
425 token = iterator.stepForward();
426 }
427 }
428  
429 }
430 }
431  
432 }).call(FoldMode.prototype);
433  
434 });
435  
436 define("ace/mode/drools",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/drools_highlight_rules","ace/mode/folding/drools"], function(require, exports, module) {
437 "use strict";
438  
439 var oop = require("../lib/oop");
440 var TextMode = require("./text").Mode;
441 var DroolsHighlightRules = require("./drools_highlight_rules").DroolsHighlightRules;
442 var DroolsFoldMode = require("./folding/drools").FoldMode;
443  
444 var Mode = function() {
445 this.HighlightRules = DroolsHighlightRules;
446 this.foldingRules = new DroolsFoldMode();
447 this.$behaviour = this.$defaultBehaviour;
448  
449 };
450 oop.inherits(Mode, TextMode);
451  
452 (function() {
453 this.lineCommentStart = "//";
454 this.$id = "ace/mode/drools";
455 }).call(Mode.prototype);
456  
457 exports.Mode = Mode;
458  
459 });