Skip to content
Snippets Groups Projects
Commit 9d5fc42a authored by root andromede's avatar root andromede
Browse files

add coloration for cases

parent 149e2cf5
No related branches found
No related tags found
No related merge requests found
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
* @author Juan Carlos Rodríguez-del-Pino <jcrodriguez@dis.ulpgc.es> * @author Juan Carlos Rodríguez-del-Pino <jcrodriguez@dis.ulpgc.es>
*/ */
ace.define("ace/mode/cases",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/cases_highlight_rules","ace/range"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,o=(e("../tokenizer").Tokenizer,e("./cases_highlight_rules").CasesHighlightRules),a=e("../range").Range,s=function(){this.HighlightRules=o};r.inherits(s,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;return i.length&&"comment"==i[i.length-1].type?r:("start"==e&&t.match(/^.*[\{\(\[\:]\s*$/)&&(r+=n),r)};var e={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(t,n,r){if("\r\n"!==r&&"\r"!==r&&"\n"!==r)return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do{var o=i.pop()}while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return!!o&&("keyword"==o.type&&e[o.value])},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new a(n,r.length-i.length,n,r.length))}}.call(s.prototype),t.Mode=s}),ace.define("ace/mode/cases_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=t.reservedKeywords="!|{|}|Class|Classe|Method|JunitFiles|ValsInCons|ValsIn|ValsOut|Grade|ShowInput|MessageErr|MethodGet|TimeLimitInSec|Complexity|TimeLimitAnalyserInSec|RangeMin|RangeMax|Sorted|LocationArg|Increment|&|;",a=t.languageConstructs="[|]",s=function(){var e=this.createKeywordMapper({keyword:o,"support.function.builtin":a,"invalid.deprecated":"debugger"},"identifier");this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"constant",regex:/\$\w+/},{token:"string",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"variable.language",regex:"(?:\\$(?:SHLVL|\\$|\\!|\\?))"},{token:"variable",regex:"(?:(?:\\$[a-zA-Z][a-zA-Z0-9_]*)|(?:[a-zA-Z][a-zA-Z0-9_]*=))"},{token:"support.function",regex:"(?:[a-zA-Z][a-zA-Z0-9_]*\\s*\\(\\))"},{token:"support.function",regex:"(?:&(?:\\d+))"},{token:"constant.numeric",regex:"(?:(?:(?:(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))|(?:\\d+)))|(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.)))"},{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"}]},this.normalizeRules()};r.inherits(s,i),t.CasesHighlightRules=s}); ace.define("ace/mode/cases",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/cases_highlight_rules","ace/range"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,o=(e("../tokenizer").Tokenizer,e("./cases_highlight_rules").CasesHighlightRules),a=e("../range").Range,s=function(){this.HighlightRules=o};r.inherits(s,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;return i.length&&"comment"==i[i.length-1].type?r:("start"==e&&t.match(/^.*[\{\(\[\:]\s*$/)&&(r+=n),r)};var e={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(t,n,r){if("\r\n"!==r&&"\r"!==r&&"\n"!==r)return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do{var o=i.pop()}while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return!!o&&("keyword"==o.type&&e[o.value])},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new a(n,r.length-i.length,n,r.length))}}.call(s.prototype),t.Mode=s}),ace.define("ace/mode/cases_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=t.reservedKeywords="!|{|}|Class|Classe|Method|JunitFiles|ValsInCons|ValsIn|ValsOut|Grade|ShowInput|MessageErr|MethodGet|TimeLimitInSec|Complexity|TimeLimitAnalyserInSec|RangeMin|RangeMax|Sorted|LocationArg|Increment|ComplexityType|&|;",a=t.languageConstructs="[|]",s=function(){var e=this.createKeywordMapper({keyword:o,"support.function.builtin":a,"invalid.deprecated":"debugger"},"identifier");this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"constant",regex:/\$\w+/},{token:"string",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"variable.language",regex:"(?:\\$(?:SHLVL|\\$|\\!|\\?))"},{token:"variable",regex:"(?:(?:\\$[a-zA-Z][a-zA-Z0-9_]*)|(?:[a-zA-Z][a-zA-Z0-9_]*=))"},{token:"support.function",regex:"(?:[a-zA-Z][a-zA-Z0-9_]*\\s*\\(\\))"},{token:"support.function",regex:"(?:&(?:\\d+))"},{token:"constant.numeric",regex:"(?:(?:(?:(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))|(?:\\d+)))|(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.)))"},{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"}]},this.normalizeRules()};r.inherits(s,i),t.CasesHighlightRules=s});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment