You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
venv/PyCharm 2025.2.1.1/plugins/python/jupyter-web/1927.js

1 line
2.9 KiB

"use strict";(self.webpackChunkjupyter_web=self.webpackChunkjupyter_web||[]).push([[1927],{81927:(A,c,a)=>{function o(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}a.r(c),a.d(c,{oz:()=>C});var p=/[\^@!\|<>#~\.\*\-\+\\/,=]/,z=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,m=/(:::)|(\.\.\.)|(=<:)|(>=:)/,f=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],l=["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"]),d=o(f),h=o(l);function i(e,n){if(e.eatSpace())return null;if(e.match(/[{}]/))return"bracket";if(e.match("[]"))return"keyword";if(e.match(m)||e.match(z))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=y),"keyword";if(e.match(d)||e.match(v))return"keyword";if(e.match(h))return n.currentIndent--,"keyword";var r=e.next();if('"'==r||"'"==r)return n.tokenize=function I(e){return function(n,t){for(var u,r=!1,s=!1;null!=(u=n.next());){if(u==e&&!r){s=!0;break}r=!r&&"\\"==u}return(s||!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=k,k(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 y(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 k(e,n){for(var r,t=!1;r=e.next();){if("/"==r&&t){n.tokenize=i;break}t="*"==r}return"comment"}const C={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(h)||r.match(d)||r.match(/(\[])/)?t.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*t.unit},languageData:{indentOnInut:function S(){var e=f.concat(l);return new RegExp("[\\[\\]]|("+e.join("|")+")$")}(),commentTokens:{line:"%",block:{open:"/*",close:"*/"}}}}}}]);