text: !function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("groovy",function(a){function b(a){for(var b={},c=a.split(" "),d=0;d<c.length;++d)b[c[d]]=!0;return b}function c(a,b){var c=a.next();if('"'==c||"'"==c)return d(c,a,b);if(/[\[\]{}\(\),;\:\.]/.test(c))return k=c,null;if(/\d/.test(c))return a.eatWhile(/[\w\.]/),a.eat(/eE/)&&(a.eat(/\+\-/),a.eatWhile(/\d/)),"number";if("/"==c){if(a.eat("*"))return b.tokenize.push(f),f(a,b);if(a.eat("/"))return a.skipToEnd(),"comment";if(g(b.lastToken,!1))return d(c,a,b)}if("-"==c&&a.eat(">"))return k="->",null;if(/[+\-*&%=<>!?|\/~]/.test(c))return a.eatWhile(/[+\-*&%=<>|~]/),"operator";if(a.eatWhile(/[\w\$_]/),"@"==c)return a.eatWhile(/[\w\$_\.]/),"meta";if("."==b.lastToken)return"property";if(a.eat(":"))return k="proplabel","property";var e=a.current();return o.propertyIsEnumerable(e)?"atom":l.propertyIsEnumerable(e)?(m.propertyIsEnumerable(e)?k="newstatement":n.propertyIsEnumerable(e)&&(k="standalone"),"keyword"):"variable"}function d(a,b,c){function d(b,c){for(var d,g=!1,h=!f;null!=(d=b.next());){if(d==a&&!g){if(!f)break;if(b.match(a+a)){h=!0;break}}if('"'==a&&"$"==d&&!g&&b.eat("{"))return c.tokenize.push(e()),"string";g=!g&&"\\"==d}return h&&c.tokenize.pop(),"string"}var f=!1;if("/"!=a&&b.eat(a)){if(!b.eat(a))return"string";f=!0}return c.tokenize.push(d),d(b,c)}function e(){function a(a,d){if("}"==a.peek()){if(b--,0==b)return d.tokenize.pop(),d.tokenize[d.tokenize.length-1](a,d)}else"{"==a.peek()&&b++;return c(a,d)}var b=1;return a.isBase=!0,a}function f(a,b){for(var c,d=!1;c=a.next();){if("/"==c&&d){b.tokenize.pop();break}d="*"==c}return"comment"}function g(a,b){return!a||"operator"==a||"->"==a||/[\.\[\{\(,;:]/.test(a)||"newstatement"==a||"keyword"==a||"proplabel"==a||"standalone"==a&&!b}function h(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function i(a,b,c){return a.context=new h(a.indented,b,c,null,a.context)}function j(a){var b=a.context.type;return(")"==b||"]"==b||"}"==b)&&(a.indented=a.context.indented),a.context=a.context.prev}var k,l=b("abstract as assert boolean break byte case catch char class const continue def default do double else enum extends final finally float for goto if implements import in instanceof int interface long native new package private protected public return short static strictfp super switch synchronized threadsafe throw throws transient try void volatile while"),m=b("catch class do else finally for if switch try while enum interface def"),n=b("return break continue"),o=b("null true false this");return c.isBase=!0,{startState:function(b){return{tokenize:[c],context:new h((b||0)-a.indentUnit,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0,"statement"!=c.type||g(b.lastToken,!0)||(j(b),c=b.context)),a.eatSpace())return null;k=null;var d=b.tokenize[b.tokenize.length-1](a,b);if("comment"==d)return d;if(null==c.align&&(c.align=!0),";"!=k&&":"!=k||"statement"!=c.type)if("->"==k&&"statement"==c.type&&"}"==c.prev.type)j(b),b.context.align=!1;else if("{"==k)i(b,a.column(),"}");else if("["==k)i(b,a.column(),"]");else if("("==k)i(b,a.column(),")");else if("}"==k){for(;"statement"==c.type;)c=j(b);for("}"==c.type&&(c=j(b));"statement"==c.type;)c=j(b)}else k==c.type?j(b):("}"==c.type||"top"==c.type||"statement"==c.type&&"newstatement"==k)&&i(b,a.column(),"statement");else j(b);return b.startOfLine=!1,b.lastToken=k||d,d},indent:function(b,c){if(!b.tokenize[b.tokenize.length-1].isBase)return 0;var d=c&&c.charAt(0),e=b.context;"statement"!=e.type||g(b.lastToken,!0)||(e=e.prev);var f=d==e.type;return"statement"==e.type?e.indented+("{"==d?0:a.indentUnit):e.align?e.column+(f?0:1):e.indented+(f?0:a.indentUnit)},electricChars:"{}",closeBrackets:{triples:"'\""},fold:"brace"}}),a.defineMIME("text/x-groovy","groovy")});