@techdocs/cli
Version:
Utility CLI for managing TechDocs sites in Backstage.
3 lines (2 loc) • 7.69 kB
JavaScript
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[6267],{14632:Y=>{function C(t){return t?typeof t=="string"?t:t.source:null}function o(t){return e("(?=",t,")")}function e(...t){return t.map(E=>C(E)).join("")}function a(...t){return"("+t.map(E=>C(E)).join("|")+")"}const T=t=>e(/\b/,t,/\w$/.test(t)?/\b/:/\B/),g=["Protocol","Type"].map(T),h=["init","self"].map(T),H=["Any","Self"],_=["associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],O=["false","nil","true"],z=["assignment","associativity","higherThan","left","lowerThan","none","right"],j=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],S=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],D=a(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),v=a(D,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),w=e(D,v,"*"),P=a(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),F=a(P,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),s=e(P,F,"*"),y=e(/[A-Z]/,F,"*"),q=["autoclosure",e(/convention\(/,a("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",e(/objc\(/,s,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","testable","UIApplicationMain","unknown","usableFromInline"],V=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Z(t){const d={match:/\s+/,relevance:0},E=t.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[t.C_LINE_COMMENT_MODE,E],X={className:"keyword",begin:e(/\./,o(a(...g,...h))),end:a(...g,...h),excludeBegin:!0},J={match:e(/\./,a(..._)),relevance:0},Q=_.filter(n=>typeof n=="string").concat(["_|0"]),ee=_.filter(n=>typeof n!="string").concat(H).map(T),ne={variants:[{className:"keyword",match:a(...ee,...h)}]},u={$pattern:a(/\b\w+/,/#\w+/),keyword:Q.concat(j),literal:O},r=[X,J,ne],te={match:e(/\./,a(...S)),relevance:0},ae={className:"built_in",match:e(/\b/,a(...S),/(?=\()/)},I=[te,ae],M={match:/->/,relevance:0},se={className:"operator",relevance:0,variants:[{match:w},{match:`\\.(\\.|${v})+`}]},p=[M,se],b="([0-9]_*)+",B="([0-9a-fA-F]_*)+",m={className:"number",relevance:0,variants:[{match:`\\b(${b})(\\.(${b}))?([eE][+-]?(${b}))?\\b`},{match:`\\b0x(${B})(\\.(${B}))?([pP][+-]?(${b}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},L=(n="")=>({className:"subst",variants:[{match:e(/\\/,n,/[0\\tnr"']/)},{match:e(/\\/,n,/u\{[0-9a-fA-F]{1,8}\}/)}]}),ce=(n="")=>({className:"subst",match:e(/\\/,n,/[\t ]*(?:[\r\n]|\r\n)/)}),k=(n="")=>({className:"subst",label:"interpol",begin:e(/\\/,n,/\(/),end:/\)/}),N=(n="")=>({begin:e(n,/"""/),end:e(/"""/,n),contains:[L(n),ce(n),k(n)]}),f=(n="")=>({begin:e(n,/"/),end:e(/"/,n),contains:[L(n),k(n)]}),l={className:"string",variants:[N(),N("#"),N("##"),N("###"),f(),f("#"),f("##"),f("###")]},U={match:e(/`/,s,/`/)},oe={className:"variable",match:/\$\d+/},ie={className:"variable",match:`\\$${F}+`},R=[U,oe,ie],ue={match:/(@|#)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:V,contains:[...p,m,l]}]}},re={className:"keyword",match:e(/@/,a(...q))},le={className:"meta",match:e(/@/,s)},A=[ue,re,le],c={match:o(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:e(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,F,"+")},{className:"type",match:y,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:e(/\s+&\s+/,o(y)),relevance:0}]},de={begin:/</,end:/>/,keywords:u,contains:[...i,...r,...A,M,c]};c.contains.push(de);const Ee={match:e(s,/\s*:/),keywords:"_|0",relevance:0},K={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",Ee,...i,...r,...I,...p,m,l,...R,...A,c]},pe={beginKeywords:"func",contains:[{className:"title",match:a(U.match,s,w),endsParent:!0,relevance:0},d]},x={begin:/</,end:/>/,contains:[...i,c]},me={begin:a(o(e(s,/\s*:/)),o(e(s,/\s+/,s,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:s}]},G={begin:/\(/,end:/\)/,keywords:u,contains:[me,...i,...r,...p,m,l,...A,c,K],endsParent:!0,illegal:/["']/},Fe={className:"function",match:o(/\bfunc\b/),contains:[pe,x,G,d],illegal:[/\[/,/%/]},be={className:"function",match:/\b(subscript|init[?!]?)\s*(?=[<(])/,keywords:{keyword:"subscript init init? init!",$pattern:/\w+[?!]?/},contains:[x,G,d],illegal:/\[|%/},Ne={beginKeywords:"operator",end:t.MATCH_NOTHING_RE,contains:[{className:"title",match:w,endsParent:!0,relevance:0}]},fe={beginKeywords:"precedencegroup",end:t.MATCH_NOTHING_RE,contains:[{className:"title",match:y,relevance:0},{begin:/{/,end:/}/,relevance:0,endsParent:!0,keywords:[...z,...O],contains:[c]}]};for(const n of l.variants){const $=n.contains.find(Ae=>Ae.label==="interpol");$.keywords=u;const W=[...r,...I,...p,m,l,...R];$.contains=[...W,{begin:/\(/,end:/\)/,contains:["self",...W]}]}return{name:"Swift",keywords:u,contains:[...i,Fe,be,{className:"class",beginKeywords:"struct protocol class extension enum",end:"\\{",excludeEnd:!0,keywords:u,contains:[t.inherit(t.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...r]},Ne,fe,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},...r,...I,...p,m,l,...R,...A,c,K]}}Y.exports=Z}}]);})();
//# sourceMappingURL=react-syntax-highlighter_languages_highlight_swift.d52918d5.chunk.js.map