(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="984d9cfc-91e2-419c-9794-7785dbcd1806",e._sentryDebugIdIdentifier="sentry-dbid-984d9cfc-91e2-419c-9794-7785dbcd1806")}catch{}})();function o(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var h=/[\^@!\|<>#~\.\*\-\+\\/,=]/,k=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,p=/(:::)|(\.\.\.)|(=<:)|(>=:)/,a=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],d=["end"],g=o(["true","false","nil","unit"]),y=o(["andthen","at","attr","declare","feat","from","lex","mod","div","mode","orelse","parser","prod","prop","scanner","self","syn","token"]),b=o(["local","proc","fun","case","class","if","cond","or","dis","choice","not","thread","try","raise","lock","for","suchthat","meth","functor"]),l=o(a),s=o(d);function i(e,n){if(e.eatSpace())return null;if(e.match(/[{}]/))return"bracket";if(e.match("[]"))return"keyword";if(e.match(p)||e.match(k))return"operator";if(e.match(g))return"atom";var t=e.match(b);if(t)return n.doInCurrentLine?n.doInCurrentLine=!1:n.currentIndent++,t[0]=="proc"||t[0]=="fun"?n.tokenize=v:t[0]=="class"?n.tokenize=w:t[0]=="meth"&&(n.tokenize=z),"keyword";if(e.match(l)||e.match(y))return"keyword";if(e.match(s))return n.currentIndent--,"keyword";var r=e.next();if(r=='"'||r=="'")return n.tokenize=m(r),n.tokenize(e,n);if(/[~\d]/.test(r)){if(r=="~")if(/^[0-9]/.test(e.peek())){if(e.next()=="0"&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))return"number"}else return null;return r=="0"&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)?"number":null}return r=="%"?(e.skipToEnd(),"comment"):r=="/"&&e.eat("*")?(n.tokenize=f,f(e,n)):h.test(r)?"operator":(e.eatWhile(/\w/),"variable")}function w(e,n){return e.eatSpace()?null:(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/),n.tokenize=i,"type")}function z(e,n){return e.eatSpace()?null:(e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/),n.tokenize=i,"def")}function v(e,n){return e.eatSpace()?null:!n.hasPassedFirstStage&&e.eat("{")?(n.hasPassedFirstStage=!0,"bracket"):n.hasPassedFirstStage?(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/),n.hasPassedFirstStage=!1,n.tokenize=i,"def"):(n.tokenize=i,null)}function f(e,n){for(var t=!1,r;r=e.next();){if(r=="/"&&t){n.tokenize=i;break}t=r=="*"}return"comment"}function m(e){return function(n,t){for(var r=!1,u,c=!1;(u=n.next())!=null;){if(u==e&&!r){c=!0;break}r=!r&&u=="\\"}return(c||!r)&&(t.tokenize=i),"string"}}function I(){var e=a.concat(d);return new RegExp("[\\[\\]]|("+e.join("|")+")$")}const x={name:"oz",startState:function(){return{tokenize:i,currentIndent:0,doInCurrentLine:!1,hasPassedFirstStage:!1}},token:function(e,n){return e.sol()&&(n.doInCurrentLine=0),n.tokenize(e,n)},indent:function(e,n,t){var r=n.replace(/^\s+|\s+$/g,"");return r.match(s)||r.match(l)||r.match(/(\[])/)?t.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*t.unit},languageData:{indentOnInut:I(),commentTokens:{line:"%",block:{open:"/*",close:"*/"}}}};export{x as oz};
//# sourceMappingURL=oz-CXCoTq0-.js.map
