You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0 lines
26 KiB

  1. ace.define("ace/mode/velocity",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/velocity_highlight_rules","ace/mode/folding/velocity"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./velocity_highlight_rules").VelocityHighlightRules,u=e("./folding/velocity").FoldMode,a=function(){var e=new o;this.foldingRules=new u,this.$tokenizer=new s(e.getRules())};r.inherits(a,i),function(){this.lineCommentStart="##",this.blockComment={start:"#*",end:"*#"}}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/velocity_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/xml_util","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./xml_util"),o=e("./text_highlight_rules").TextHighlightRules,u=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,f=function(){var e=i.arrayToMap("true|false|null".split("|")),t=i.arrayToMap("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool".split("|")),n=i.arrayToMap("$contentRoot|$foreach".split("|")),r=i.arrayToMap("#set|#macro|#include|#parse|#if|#elseif|#else|#foreach|#break|#end|#stop".split("|"));this.$rules={start:[{token:"meta.tag",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml-pe",regex:"<\\?.*?\\?>"},{token:"comment",regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<(?=\\s*script\\b)",next:"script"},{token:"meta.tag",regex:"<(?=\\s*style\\b)",next:"style"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"comment",regex:"##.*$"},{token:"comment.block",regex:"#\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(i){return r.hasOwnProperty(i)?"keyword":e.hasOwnProperty(i)?"constant.language":n.hasOwnProperty(i)?"variable.language":t.hasOwnProperty(i)||t.hasOwnProperty(i.substring(1))?"support.function":i=="debugger"?"invalid.deprecated":i.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/)?"variable":"identifier"},regex:"[a-zA-Z$#][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"!|&|\\*|\\-|\\+|=|!=|<=|>=<|>|&&|\\|\\|"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:".+"}],comment:[{token:"comment.block",regex:".*?\\*#",next:"start"},{token:"comment",regex:".+"}],vm_start:[{token:"variable",regex:"}",next:"start"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(i){return r.hasOwnProperty(i)?"keyword":e.hasOwnProperty(i)?"constant.language":n.hasOwnProperty(i)?"variable.language":t.hasOwnProperty(i)||t.hasOwnProperty(i.substring(1))?"support.function":i=="debugger"?"invalid.deprecated":i.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/)?"variable":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|&|\\*|\\-|\\+|=|!=|<=|>=<|>|&&|\\|\\|"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]},s.tag(this.$rules,"tag","start"),s.tag(this.$rules,"style","css-start"),s.tag(this.$rules,"script","js-start"),this.embedRules(a,"js-",[{token:"comment",regex:"\\/\\/.