芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/public_html/media/vendor/codemirror/mode/groovy/groovy.min.js
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("groovy",(function(t){function n(e){for(var t={},n=e.split(" "),r=0;r
"))return r="->",null;if(/[+\-*&%=<>!?|\/~]/.test(n))return e.eatWhile(/[+\-*&%=<>|~]/),"operator";if(e.eatWhile(/[\w\$_]/),"@"==n)return e.eatWhile(/[\w\$_\.]/),"meta";if("."==t.lastToken)return"property";if(e.eat(":"))return r="proplabel","property";var s=e.current();return l.propertyIsEnumerable(s)?"atom":i.propertyIsEnumerable(s)?(o.propertyIsEnumerable(s)?r="newstatement":a.propertyIsEnumerable(s)&&(r="standalone"),"keyword"):"variable"}function u(e,t,n){var r=!1;if("/"!=e&&t.eat(e)){if(!t.eat(e))return"string";r=!0}function i(t,n){for(var i,o=!1,a=!r;null!=(i=t.next());){if(i==e&&!o){if(!r)break;if(t.match(e+e)){a=!0;break}}if('"'==e&&"$"==i&&!o&&t.eat("{"))return n.tokenize.push(f()),"string";o=!o&&"\\"==i}return a&&n.tokenize.pop(),"string"}return n.tokenize.push(i),i(t,n)}function f(){var e=1;function t(t,n){if("}"==t.peek()){if(0==--e)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)}else"{"==t.peek()&&e++;return s(t,n)}return t.isBase=!0,t}function c(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize.pop();break}r="*"==n}return"comment"}function p(e,t){return!e||"operator"==e||"->"==e||/[\.\[\{\(,;:]/.test(e)||"newstatement"==e||"keyword"==e||"proplabel"==e||"standalone"==e&&!t}function d(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function m(e,t,n){return e.context=new d(e.indented,t,n,null,e.context)}function y(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return s.isBase=!0,{startState:function(e){return{tokenize:[s],context:new d((e||0)-t.indentUnit,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0,"statement"!=n.type||p(t.lastToken,!0)||(y(t),n=t.context)),e.eatSpace())return null;r=null;var i=t.tokenize[t.tokenize.length-1](e,t);if("comment"==i)return i;if(null==n.align&&(n.align=!0),";"!=r&&":"!=r||"statement"!=n.type)if("->"==r&&"statement"==n.type&&"}"==n.prev.type)y(t),t.context.align=!1;else if("{"==r)m(t,e.column(),"}");else if("["==r)m(t,e.column(),"]");else if("("==r)m(t,e.column(),")");else if("}"==r){for(;"statement"==n.type;)n=y(t);for("}"==n.type&&(n=y(t));"statement"==n.type;)n=y(t)}else r==n.type?y(t):("}"==n.type||"top"==n.type||"statement"==n.type&&"newstatement"==r)&&m(t,e.column(),"statement");else y(t);return t.startOfLine=!1,t.lastToken=r||i,i},indent:function(n,r){if(!n.tokenize[n.tokenize.length-1].isBase)return e.Pass;var i=r&&r.charAt(0),o=n.context;"statement"!=o.type||p(n.lastToken,!0)||(o=o.prev);var a=i==o.type;return"statement"==o.type?o.indented+("{"==i?0:t.indentUnit):o.align?o.column+(a?0:1):o.indented+(a?0:t.indentUnit)},electricChars:"{}",closeBrackets:{triples:"'\""},fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}})),e.defineMIME("text/x-groovy","groovy")}));