"use strict";(self.webpackChunksc_note_comment=self.webpackChunksc_note_comment||[]).push([[9343],{9343(C,s,k){function o(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}k.d(s,{oz:()=>S});var p=/[\^@!\|<>#~\.\*\-\+\\/,=]/,m=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,z=/(:::)|(\.\.\.)|(=<:)|(>=:)/,c=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],a=["end"],w=o(["true","false","nil","unit"]),v=o(["andthen","at","attr","declare","feat","from","lex","mod","div","mode","orelse","parser","prod","prop","scanner","self","syn","token"]),g=o(["local","proc","fun","case","class","if","cond","or","dis","choice","not","thread","try","raise","lock","for","suchthat","meth","functor"]),f=o(c),l=o(a);function i(e,n){if(e.eatSpace())return null;if(e.match(/[{}]/))return"bracket";if(e.match("[]"))return"keyword";if(e.match(z)||e.match(m))return"operator";if(e.match(w))return"atom";var t=e.match(g);if(t)return n.doInCurrentLine?n.doInCurrentLine=!1:n.currentIndent++,"proc"==t[0]||"fun"==t[0]?n.tokenize=x:"class"==t[0]?n.tokenize=b:"meth"==t[0]&&(n.tokenize=_),"keyword";if(e.match(f)||e.match(v))return"keyword";if(e.match(l))return n.currentIndent--,"keyword";var r=e.next();if('"'==r||"'"==r)return n.tokenize=function y(e){return function(n,t){for(var u,r=!1,h=!1;null!=(u=n.next());){if(u==e&&!r){h=!0;break}r=!r&&"\\"==u}return(h||!r)&&(t.tokenize=i),"string"}}(r),n.tokenize(e,n);if(/[~\d]/.test(r)){if("~"==r){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"==r&&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=d,d(e,n)):p.test(r)?"operator":(e.eatWhile(/\w/),"variable")}function b(e,n){return e.eatSpace()?null:(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/),n.tokenize=i,"type")}function _(e,n){return e.eatSpace()?null:(e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/),n.tokenize=i,"def")}function x(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 d(e,n){for(var r,t=!1;r=e.next();){if("/"==r&&t){n.tokenize=i;break}t="*"==r}return"comment"}const S={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(l)||r.match(f)||r.match(/(\[])/)?t.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*t.unit},languageData:{indentOnInut:function I(){var e=c.concat(a);return new RegExp("[\\[\\]]|("+e.join("|")+")$")}(),commentTokens:{line:"%",block:{open:"/*",close:"*/"}}}}}}]);