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

1 line
4.0 KiB

"use strict";(self.webpackChunkjupyter_web=self.webpackChunkjupyter_web||[]).push([[5228],{25228:(F,f,l)=>{function u(n){for(var e={},t=0;t<n.length;t++)e[n[t]]=!0;return e}l.r(f),l.d(f,{swift:()=>$});var d=u(["_","var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","open","public","internal","fileprivate","private","deinit","init","new","override","self","subscript","super","convenience","dynamic","final","indirect","lazy","required","static","unowned","unowned(safe)","unowned(unsafe)","weak","as","is","break","case","continue","default","else","fallthrough","for","guard","if","in","repeat","switch","where","while","defer","return","inout","mutating","nonmutating","isolated","nonisolated","catch","do","rethrows","throw","throws","async","await","try","didSet","get","set","willSet","assignment","associativity","infix","left","none","operator","postfix","precedence","precedencegroup","prefix","right","Any","AnyObject","Type","dynamicType","Self","Protocol","__COLUMN__","__FILE__","__FUNCTION__","__LINE__"]),h=u(["var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"]),v=u(["true","false","nil","self","super","_"]),s=u(["Array","Bool","Character","Dictionary","Double","Float","Int","Int8","Int16","Int32","Int64","Never","Optional","Set","String","UInt8","UInt16","UInt32","UInt64","Void"]),y=/^\-?0b[01][01_]*/,w=/^\-?0o[0-7][0-7_]*/,g=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,x=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,b=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,z=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,A=/^\#[A-Za-z]+/,I=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;function p(n,e,t){if(n.sol()&&(e.indented=n.indentation()),n.eatSpace())return null;var i,r=n.peek();if("/"==r){if(n.match("//"))return n.skipToEnd(),"comment";if(n.match("/*"))return e.tokenize.push(a),a(n,e)}if(n.match(A))return"builtin";if(n.match(I))return"attribute";if(n.match(y)||n.match(w)||n.match(g)||n.match(x))return"number";if(n.match(z))return"property";if("+-/*%=|&<>~^?!".indexOf(r)>-1)return n.next(),"operator";if(":;,.(){}[]".indexOf(r)>-1)return n.next(),n.match(".."),"punctuation";if(i=n.match(/("""|"|')/)){var o=m.bind(null,i[0]);return e.tokenize.push(o),o(n,e)}if(n.match(b)){var c=n.current();return s.hasOwnProperty(c)?"type":v.hasOwnProperty(c)?"atom":d.hasOwnProperty(c)?(h.hasOwnProperty(c)&&(e.prev="define"),"keyword"):"define"==t?"def":"variable"}return n.next(),null}function O(){var n=0;return function(e,t,r){var i=p(e,t,r);if("punctuation"==i)if("("==e.current())++n;else if(")"==e.current()){if(0==n)return e.backUp(1),t.tokenize.pop(),t.tokenize[t.tokenize.length-1](e,t);--n}return i}}function m(n,e,t){for(var i,r=1==n.length,o=!1;i=e.peek();)if(o){if(e.next(),"("==i)return t.tokenize.push(O()),"string";o=!1}else{if(e.match(n))return t.tokenize.pop(),"string";e.next(),o="\\"==i}return r&&t.tokenize.pop(),"string"}function a(n,e){for(var t;t=n.next();)if("/"===t&&n.eat("*"))e.tokenize.push(a);else if("*"===t&&n.eat("/")){e.tokenize.pop();break}return"comment"}function C(n,e,t){this.prev=n,this.align=e,this.indented=t}function S(n,e){var t=e.match(/^\s*($|\/[\/\*]|[)}\]])/,!1)?null:e.column()+1;n.context=new C(n.context,t,n.indented)}function U(n){n.context&&(n.indented=n.context.indented,n.context=n.context.prev)}const $={name:"swift",startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(n,e){var t=e.prev;e.prev=null;var i=(e.tokenize[e.tokenize.length-1]||p)(n,e,t);if(i&&"comment"!=i?e.prev||(e.prev=i):e.prev=t,"punctuation"==i){var o=/[\(\[\{]|([\]\)\}])/.exec(n.current());o&&(o[1]?U:S)(e,n)}return i},indent:function(n,e,t){var r=n.context;if(!r)return 0;var i=/^[\]\}\)]/.test(e);return null!=r.align?r.align-(i?1:0):r.indented+(i?0:t.unit)},languageData:{indentOnInput:/^\s*[\)\}\]]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}}}}]);