Liferay.Loader.define("journal-web$codemirror@5.65.2/mode/groovy/groovy",["module","exports","require","../../lib/codemirror"],(function(e,n,r){var o,i=void 0;window;o=function(e){"use strict";e.defineMode("groovy",(function(n){function words(e){for(var n={},r=e.split(" "),o=0;o<r.length;++o)n[r[o]]=!0;return n}var r,o=words("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 trait transient try void volatile while"),i=words("catch class def do else enum finally for if interface switch trait try while"),a=words("return break continue"),s=words("null true false this");function tokenBase(e,n){var l=e.next();if('"'==l||"'"==l)return startString(l,e,n);if(/[\[\]{}\(\),;\:\.]/.test(l))return r=l,null;if(/\d/.test(l))return e.eatWhile(/[\w\.]/),e.eat(/eE/)&&(e.eat(/\+\-/),e.eatWhile(/\d/)),"number";if("/"==l){if(e.eat("*"))return n.tokenize.push(tokenComment),tokenComment(e,n);if(e.eat("/"))return e.skipToEnd(),"comment";if(expectExpression(n.lastToken,!1))return startString(l,e,n)}if("-"==l&&e.eat(">"))return r="->",null;if(/[+\-*&%=<>!?|\/~]/.test(l))return e.eatWhile(/[+\-*&%=<>|~]/),"operator";if(e.eatWhile(/[\w\$_]/),"@"==l)return e.eatWhile(/[\w\$_\.]/),"meta";if("."==n.lastToken)return"property";if(e.eat(":"))return r="proplabel","property";var p=e.current();return s.propertyIsEnumerable(p)?"atom":o.propertyIsEnumerable(p)?(i.propertyIsEnumerable(p)?r="newstatement":a.propertyIsEnumerable(p)&&(r="standalone"),"keyword"):"variable"}function startString(e,n,r){var o=!1;if("/"!=e&&n.eat(e)){if(!n.eat(e))return"string";o=!0}function t(n,r){for(var i,a=!1,s=!o;null!=(i=n.next());){if(i==e&&!a){if(!o)break;if(n.match(e+e)){s=!0;break}}if('"'==e&&"$"==i&&!a&&n.eat("{"))return r.tokenize.push(tokenBaseUntilBrace()),"string";a=!a&&"\\"==i}return s&&r.tokenize.pop(),"string"}return r.tokenize.push(t),t(n,r)}function tokenBaseUntilBrace(){var e=1;function t(n,r){if("}"==n.peek()){if(0==--e)return r.tokenize.pop(),r.tokenize[r.tokenize.length-1](n,r)}else"{"==n.peek()&&e++;return tokenBase(n,r)}return t.isBase=!0,t}function tokenComment(e,n){for(var r,o=!1;r=e.next();){if("/"==r&&o){n.tokenize.pop();break}o="*"==r}return"comment"}function expectExpression(e,n){return!e||"operator"==e||"->"==e||/[\.\[\{\(,;:]/.test(e)||"newstatement"==e||"keyword"==e||"proplabel"==e||"standalone"==e&&!n}function Context(e,n,r,o,i){this.indented=e,this.column=n,this.type=r,this.align=o,this.prev=i}function pushContext(e,n,r){return e.context=new Context(e.indented,n,r,null,e.context)}function popContext(e){var n=e.context.type;return")"!=n&&"]"!=n&&"}"!=n||(e.indented=e.context.indented),e.context=e.context.prev}return tokenBase.isBase=!0,{startState:function(e){return{tokenize:[tokenBase],context:new Context((e||0)-n.indentUnit,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,n){var o=n.context;if(e.sol()&&(null==o.align&&(o.align=!1),n.indented=e.indentation(),n.startOfLine=!0,"statement"!=o.type||expectExpression(n.lastToken,!0)||(popContext(n),o=n.context)),e.eatSpace())return null;r=null;var i=n.tokenize[n.tokenize.length-1](e,n);if("comment"==i)return i;if(null==o.align&&(o.align=!0),";"!=r&&":"!=r||"statement"!=o.type)if("->"==r&&"statement"==o.type&&"}"==o.prev.type)popContext(n),n.context.align=!1;else if("{"==r)pushContext(n,e.column(),"}");else if("["==r)pushContext(n,e.column(),"]");else if("("==r)pushContext(n,e.column(),")");else if("}"==r){for(;"statement"==o.type;)o=popContext(n);for("}"==o.type&&(o=popContext(n));"statement"==o.type;)o=popContext(n)}else r==o.type?popContext(n):("}"==o.type||"top"==o.type||"statement"==o.type&&"newstatement"==r)&&pushContext(n,e.column(),"statement");else popContext(n);return n.startOfLine=!1,n.lastToken=r||i,i},indent:function(r,o){if(!r.tokenize[r.tokenize.length-1].isBase)return e.Pass;var i=o&&o.charAt(0),a=r.context;"statement"!=a.type||expectExpression(r.lastToken,!0)||(a=a.prev);var s=i==a.type;return"statement"==a.type?a.indented+("{"==i?0:n.indentUnit):a.align?a.column+(s?0:1):a.indented+(s?0:n.indentUnit)},electricChars:"{}",closeBrackets:{triples:"'\""},fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}})),e.defineMIME("text/x-groovy","groovy")},"object"==typeof n&&"object"==typeof e?o(r("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],o):o(CodeMirror)}));
//# sourceMappingURL=groovy.js.map