Liferay.Loader.define("fragment-web$codemirror@5.65.2/mode/oz/oz",["module","exports","require","../../lib/codemirror"],(function(e,t,n){var r,o=void 0;window;r=function(e){"use strict";e.defineMode("oz",(function(e){function wordRegexp(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var t=/[\^@!\|<>#~\.\*\-\+\\/,=]/,n=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,r=/(:::)|(\.\.\.)|(=<:)|(>=:)/,o=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],a=["end"],i=wordRegexp(["true","false","nil","unit"]),c=wordRegexp(["andthen","at","attr","declare","feat","from","lex","mod","div","mode","orelse","parser","prod","prop","scanner","self","syn","token"]),u=wordRegexp(["local","proc","fun","case","class","if","cond","or","dis","choice","not","thread","try","raise","lock","for","suchthat","meth","functor"]),d=wordRegexp(o),s=wordRegexp(a);function tokenBase(e,o){if(e.eatSpace())return null;if(e.match(/[{}]/))return"bracket";if(e.match("[]"))return"keyword";if(e.match(r)||e.match(n))return"operator";if(e.match(i))return"atom";var a=e.match(u);if(a)return o.doInCurrentLine?o.doInCurrentLine=!1:o.currentIndent++,"proc"==a[0]||"fun"==a[0]?o.tokenize=tokenFunProc:"class"==a[0]?o.tokenize=tokenClass:"meth"==a[0]&&(o.tokenize=tokenMeth),"keyword";if(e.match(d)||e.match(c))return"keyword";if(e.match(s))return o.currentIndent--,"keyword";var f=e.next();if('"'==f||"'"==f)return o.tokenize=function tokenString(e){return function(t,n){for(var r,o=!1,a=!1;null!=(r=t.next());){if(r==e&&!o){a=!0;break}o=!o&&"\\"==r}return!a&&o||(n.tokenize=tokenBase),"string"}}(f),o.tokenize(e,o);if(/[~\d]/.test(f)){if("~"==f){if(!/^[0-9]/.test(e.peek()))return null;if("0"==e.next()&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))return"number"}return"0"==f&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)?"number":null}return"%"==f?(e.skipToEnd(),"comment"):"/"==f&&e.eat("*")?(o.tokenize=tokenComment,tokenComment(e,o)):t.test(f)?"operator":(e.eatWhile(/\w/),"variable")}function tokenClass(e,t){return e.eatSpace()?null:(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=tokenBase,"variable-3")}function tokenMeth(e,t){return e.eatSpace()?null:(e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=tokenBase,"def")}function tokenFunProc(e,t){return e.eatSpace()?null:!t.hasPassedFirstStage&&e.eat("{")?(t.hasPassedFirstStage=!0,"bracket"):t.hasPassedFirstStage?(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/),t.hasPassedFirstStage=!1,t.tokenize=tokenBase,"def"):(t.tokenize=tokenBase,null)}function tokenComment(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=tokenBase;break}r="*"==n}return"comment"}return{startState:function(){return{tokenize:tokenBase,currentIndent:0,doInCurrentLine:!1,hasPassedFirstStage:!1}},token:function(e,t){return e.sol()&&(t.doInCurrentLine=0),t.tokenize(e,t)},indent:function(t,n){var r=n.replace(/^\s+|\s+$/g,"");return r.match(s)||r.match(d)||r.match(/(\[])/)?e.indentUnit*(t.currentIndent-1):t.currentIndent<0?0:t.currentIndent*e.indentUnit},fold:"indent",electricInput:function buildElectricInputRegEx(){var e=o.concat(a);return new RegExp("[\\[\\]]|("+e.join("|")+")$")}(),lineComment:"%",blockCommentStart:"/*",blockCommentEnd:"*/"}})),e.defineMIME("text/x-oz","oz")},"object"==typeof t&&"object"==typeof e?r(n("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],r):r(CodeMirror)}));
//# sourceMappingURL=oz.js.map