blob: b5eab1dab2160e1e4ef85e87156b236a9a086e95 [file] [log] [blame]
{"version":3,"sources":["webpack:///./node_modules/react-syntax-highlighter/node_modules/highlight.js/lib/languages/swift.js"],"names":["module","exports","hljs","SWIFT_KEYWORDS","keyword","literal","built_in","BLOCK_COMMENT","COMMENT","contains","SUBST","className","begin","end","keywords","STRING","BACKSLASH_ESCAPE","variants","NUMBERS","relevance","name","C_LINE_COMMENT_MODE","beginKeywords","excludeEnd","inherit","TITLE_MODE","endsParent","C_BLOCK_COMMENT_MODE","illegal"],"mappings":"8EAmGAA,EAAOC,QA3FP,SAAeC,GACb,IAAIC,EAAiB,CACnBC,QAAS,gvBACTC,QAAS,iBACTC,SAAU,0lCAYRC,EAAgBL,EAAKM,QAAQ,OAAQ,OAAQ,CAC/CC,SAAU,CAAC,UAETC,EAAQ,CACVC,UAAW,QACXC,MAAO,OACPC,IAAK,MACLC,SAAUX,EACVM,SAAU,IAGRM,EAAS,CACXJ,UAAW,SACXF,SAAU,CAACP,EAAKc,iBAAkBN,GAClCO,SAAU,CAAC,CACTL,MAAO,MACPC,IAAK,OACJ,CACDD,MAAO,IACPC,IAAK,OAGLK,EAAU,CACZP,UAAW,SACXC,MAAO,wFACPO,UAAW,GAGb,OADAT,EAAMD,SAAW,CAACS,GACX,CACLE,KAAM,QACNN,SAAUX,EACVM,SAAU,CAACM,EAAQb,EAAKmB,oBAAqBd,EAnCrB,CACxBI,UAAW,OACXC,MAAO,0BARE,CACTD,UAAW,OACXC,MAAO,qBACPO,UAAW,GAsC4ED,EAAS,CAC9FP,UAAW,WACXW,cAAe,OACfT,IAAK,IACLU,YAAY,EACZd,SAAU,CAACP,EAAKsB,QAAQtB,EAAKuB,WAAY,CACvCb,MAAO,6BACL,CACFA,MAAO,IACPC,IAAK,KACJ,CACDF,UAAW,SACXC,MAAO,KACPC,IAAK,KACLa,YAAY,EACZZ,SAAUX,EACVM,SAAU,CAAC,OAAQS,EAASH,EAAQb,EAAKyB,qBAAsB,CAC7Df,MAAO,MAGTgB,QAAS,SAEXA,QAAS,QACR,CACDjB,UAAW,QACXW,cAAe,uCACfR,SAAUX,EACVU,IAAK,MACLU,YAAY,EACZd,SAAU,CAACP,EAAKsB,QAAQtB,EAAKuB,WAAY,CACvCb,MAAO,4CAER,CACDD,UAAW,OAEXC,MAAO,kVACN,CACDU,cAAe,SACfT,IAAK,IACLJ,SAAU,CAACP,EAAKmB,oBAAqBd","file":"react-syntax-highlighter_languages_highlight_swift-2e0198df6c20535f75fa.js","sourcesContent":["/*\nLanguage: Swift\nDescription: Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns.\nAuthor: Chris Eidhof <chris@eidhof.nl>\nContributors: Nate Cook <natecook@gmail.com>, Alexander Lichter <manniL@gmx.net>\nWebsite: https://swift.org\nCategory: common, system\n*/\nfunction swift(hljs) {\n var SWIFT_KEYWORDS = {\n keyword: '#available #colorLiteral #column #else #elseif #endif #file ' + '#fileLiteral #function #if #imageLiteral #line #selector #sourceLocation ' + '_ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype ' + 'associativity break case catch class continue convenience default defer deinit didSet do ' + 'dynamic dynamicType else enum extension fallthrough false fileprivate final for func ' + 'get guard if import in indirect infix init inout internal is lazy left let ' + 'mutating nil none nonmutating open operator optional override postfix precedence ' + 'prefix private protocol Protocol public repeat required rethrows return ' + 'right self Self set static struct subscript super switch throw throws true ' + 'try try! try? Type typealias unowned var weak where while willSet',\n literal: 'true false nil',\n built_in: 'abs advance alignof alignofValue anyGenerator assert assertionFailure ' + 'bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC ' + 'bridgeToObjectiveCUnconditional c compactMap contains count countElements countLeadingZeros ' + 'debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords ' + 'enumerate equal fatalError filter find getBridgedObjectiveCType getVaList ' + 'indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC ' + 'isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare ' + 'map max maxElement min minElement numericCast overlaps partition posix ' + 'precondition preconditionFailure print println quickSort readLine reduce reflect ' + 'reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split ' + 'startsWith stride strideof strideofValue swap toString transcode ' + 'underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap ' + 'unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer ' + 'withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers ' + 'withUnsafePointer withUnsafePointers withVaList zip'\n };\n var TYPE = {\n className: 'type',\n begin: \"\\\\b[A-Z][\\\\w\\xC0-\\u02B8']*\",\n relevance: 0\n }; // slightly more special to swift\n\n var OPTIONAL_USING_TYPE = {\n className: 'type',\n begin: \"\\\\b[A-Z][\\\\w\\xC0-\\u02B8']*[!?]\"\n };\n var BLOCK_COMMENT = hljs.COMMENT('/\\\\*', '\\\\*/', {\n contains: ['self']\n });\n var SUBST = {\n className: 'subst',\n begin: /\\\\\\(/,\n end: '\\\\)',\n keywords: SWIFT_KEYWORDS,\n contains: [] // assigned later\n\n };\n var STRING = {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n variants: [{\n begin: /\"\"\"/,\n end: /\"\"\"/\n }, {\n begin: /\"/,\n end: /\"/\n }]\n };\n var NUMBERS = {\n className: 'number',\n begin: '\\\\b([\\\\d_]+(\\\\.[\\\\deE_]+)?|0x[a-fA-F0-9_]+(\\\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\\\b',\n relevance: 0\n };\n SUBST.contains = [NUMBERS];\n return {\n name: 'Swift',\n keywords: SWIFT_KEYWORDS,\n contains: [STRING, hljs.C_LINE_COMMENT_MODE, BLOCK_COMMENT, OPTIONAL_USING_TYPE, TYPE, NUMBERS, {\n className: 'function',\n beginKeywords: 'func',\n end: '{',\n excludeEnd: true,\n contains: [hljs.inherit(hljs.TITLE_MODE, {\n begin: /[A-Za-z$_][0-9A-Za-z$_]*/\n }), {\n begin: /</,\n end: />/\n }, {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n endsParent: true,\n keywords: SWIFT_KEYWORDS,\n contains: ['self', NUMBERS, STRING, hljs.C_BLOCK_COMMENT_MODE, {\n begin: ':'\n } // relevance booster\n ],\n illegal: /[\"']/\n }],\n illegal: /\\[|%/\n }, {\n className: 'class',\n beginKeywords: 'struct protocol class extension enum',\n keywords: SWIFT_KEYWORDS,\n end: '\\\\{',\n excludeEnd: true,\n contains: [hljs.inherit(hljs.TITLE_MODE, {\n begin: /[A-Za-z$_][\\u00C0-\\u02B80-9A-Za-z$_]*/\n })]\n }, {\n className: 'meta',\n // @attributes\n begin: '(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|' + '@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|' + '@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|' + '@infix|@prefix|@postfix|@autoclosure|@testable|@available|' + '@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|' + '@propertyWrapper)\\\\b'\n }, {\n beginKeywords: 'import',\n end: /$/,\n contains: [hljs.C_LINE_COMMENT_MODE, BLOCK_COMMENT]\n }]\n };\n}\n\nmodule.exports = swift;"],"sourceRoot":""}