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/310.js

1 line
5.3 KiB

"use strict";(self.webpackChunkjupyter_web=self.webpackChunkjupyter_web||[]).push([[310],{30310:(q,l,t)=>{function u(e,n,i){return typeof i>"u"&&(i=""),typeof n>"u"&&(n="\\b"),new RegExp("^"+i+"(("+e.join(")|(")+"))"+n)}t.r(l),t.d(l,{julia:()=>Z});var a=["[<>]:","[<>=]=","<<=?",">>>?=?","=>","--?>","<--[->]?","\\/\\/","\\.{2,3}","[\\.\\\\%*+\\-<>!\\/^|&]=?","\\?","\\$","~",":"],g=u(["[<>]:","[<>=]=","[!=]==","<<=?",">>>?=?","=>?","--?>","<--[->]?","\\/\\/","[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),y=/^[;,()[\]{}]/,m=/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,z=u(["\\\\[0-7]{1,3}","\\\\x[A-Fa-f0-9]{1,2}","\\\\[abefnrtv0%?'\"\\\\]","([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])"],"'"),p=["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","where","macro","module","baremodule","struct","type","mutable","immutable","quote","typealias","abstract","primitive","bitstype"],h=["true","false","nothing","NaN","Inf"],C=u(["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"]),A=u(["end","else","elseif","catch","finally"]),E=u(p),_=u(h),D=/^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,T=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,P=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/,j=u(a,"","@"),B=u(a,"",":");function s(e){return e.nestedArrays>0}function d(e,n){return typeof n>"u"&&(n=0),e.scopes.length<=n?null:e.scopes[e.scopes.length-(n+1)]}function f(e,n){if(e.match("#=",!1))return n.tokenize=$,n.tokenize(e,n);var i=n.leavingExpr;if(e.sol()&&(i=!1),n.leavingExpr=!1,i&&e.match(/^'+/))return"operator";if(e.match(/\.{4,}/))return"error";if(e.match(/\.{1,3}/))return"operator";if(e.eatSpace())return null;var o,r=e.peek();if("#"===r)return e.skipToEnd(),"comment";if("["===r&&(n.scopes.push("["),n.nestedArrays++),"("===r&&(n.scopes.push("("),n.nestedGenerators++),s(n)&&"]"===r){for(;n.scopes.length&&"["!==d(n);)n.scopes.pop();n.scopes.pop(),n.nestedArrays--,n.leavingExpr=!0}if(function G(e){return e.nestedGenerators>0}(n)&&")"===r){for(;n.scopes.length&&"("!==d(n);)n.scopes.pop();n.scopes.pop(),n.nestedGenerators--,n.leavingExpr=!0}if(s(n)){if("end"==n.lastToken&&e.match(":"))return"operator";if(e.match("end"))return"number"}if((o=e.match(C,!1))&&n.scopes.push(o[0]),e.match(A,!1)&&n.scopes.pop(),e.match(/^::(?![:\$])/))return n.tokenize=S,n.tokenize(e,n);if(!i&&(e.match(T)||e.match(B)))return"builtin";if(e.match(g))return"operator";if(e.match(/^\.?\d/,!1)){var R=RegExp(/^im\b/),c=!1;if(e.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(c=!0),e.match(/^0x[0-9a-f_]+/i)&&(c=!0),e.match(/^0b[01_]+/i)&&(c=!0),e.match(/^0o[0-7_]+/i)&&(c=!0),e.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(c=!0),e.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(c=!0),c)return e.match(R),n.leavingExpr=!0,"number"}if(e.match("'"))return n.tokenize=I,n.tokenize(e,n);if(e.match(P))return n.tokenize=function O(e){function n(i,r){if(i.eat("\\"))i.next();else{if(i.match(e))return r.tokenize=f,r.leavingExpr=!0,"string";i.eat(/[`"]/)}return i.eatWhile(/[^\\`"]/),"string"}return'"""'===e.substr(-3)?e='"""':'"'===e.substr(-1)&&(e='"'),n}(e.current()),n.tokenize(e,n);if(e.match(D)||e.match(j))return"meta";if(e.match(y))return null;if(e.match(E))return"keyword";if(e.match(_))return"builtin";var N=n.isDefinition||"function"==n.lastToken||"macro"==n.lastToken||"type"==n.lastToken||"struct"==n.lastToken||"immutable"==n.lastToken;return e.match(m)?N?"."===e.peek()?(n.isDefinition=!0,"variable"):(n.isDefinition=!1,"def"):(n.leavingExpr=!0,"variable"):(e.next(),"error")}function S(e,n){return e.match(/.*?(?=[,;{}()=\s]|$)/),e.match("{")?n.nestedParameters++:e.match("}")&&n.nestedParameters>0&&n.nestedParameters--,n.nestedParameters>0?e.match(/.*?(?={|})/)||e.next():0==n.nestedParameters&&(n.tokenize=f),"builtin"}function $(e,n){return e.match("#=")&&n.nestedComments++,e.match(/.*?(?=(#=|=#))/)||e.skipToEnd(),e.match("=#")&&(n.nestedComments--,0==n.nestedComments&&(n.tokenize=f)),"comment"}function I(e,n){var r,i=!1;if(e.match(z))i=!0;else if(r=e.match(/\\u([a-f0-9]{1,4})(?=')/i)){((o=parseInt(r[1],16))<=55295||o>=57344)&&(i=!0,e.next())}else if(r=e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var o;(o=parseInt(r[1],16))<=1114111&&(i=!0,e.next())}return i?(n.leavingExpr=!0,n.tokenize=f,"string"):(e.match(/^[^']+(?=')/)||e.skipToEnd(),e.match("'")&&(n.tokenize=f),"error")}const Z={name:"julia",startState:function(){return{tokenize:f,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,firstParenPos:-1}},token:function(e,n){var i=n.tokenize(e,n),r=e.current();return r&&i&&(n.lastToken=r),i},indent:function(e,n,i){var r=0;return("]"===n||")"===n||/^end\b/.test(n)||/^else/.test(n)||/^catch\b/.test(n)||/^elseif\b/.test(n)||/^finally/.test(n))&&(r=-1),(e.scopes.length+r)*i.unit},languageData:{indentOnInput:/^\s*(end|else|catch|finally)\b$/,commentTokens:{line:"#",block:{open:"#=",close:"=#"}},closeBrackets:{brackets:["(","[","{",'"']},autocomplete:p.concat(h)}}}}]);