summaryrefslogtreecommitdiff
path: root/pyssg.xyz/live/static/hl/languages/swift.min.js
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2022-12-13 20:44:08 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2022-12-13 20:44:08 -0600
commitabc0de079b895af1b705894eb2b63596e3e37274 (patch)
treec51d24dce55da8d9b227cbac6c2ef64a59d8e9dc /pyssg.xyz/live/static/hl/languages/swift.min.js
parentdb4b3736d4f45137a733ce5eb1e50aec968ca1d2 (diff)
add pyssg.xyz configs and templates
Diffstat (limited to 'pyssg.xyz/live/static/hl/languages/swift.min.js')
-rw-r--r--pyssg.xyz/live/static/hl/languages/swift.min.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/pyssg.xyz/live/static/hl/languages/swift.min.js b/pyssg.xyz/live/static/hl/languages/swift.min.js
new file mode 100644
index 0000000..57c53b6
--- /dev/null
+++ b/pyssg.xyz/live/static/hl/languages/swift.min.js
@@ -0,0 +1,26 @@
+hljs.registerLanguage("swift",(()=>{"use strict";return e=>{var i={
+$pattern:/[\w#]+/,
+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 some static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",
+literal:"true false nil",
+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=e.COMMENT("/\\*","\\*/",{contains:["self"]}),t={className:"subst",
+begin:/\\\(/,end:"\\)",keywords:i,contains:[]},a={className:"string",
+contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"""/,end:/"""/},{begin:/"/,
+end:/"/}]},r="([0-9a-fA-F]_*)+",s={className:"number",relevance:0,variants:[{
+begin:"\\b(([0-9]_*)+)(\\.(([0-9]_*)+))?([eE][+-]?(([0-9]_*)+))?\\b"},{
+begin:`\\b0x(${r})(\\.(${r}))?([pP][+-]?(([0-9]_*)+))?\\b`},{
+begin:/\b0o([0-7]_*)+\b/},{begin:/\b0b([01]_*)+\b/}]};return t.contains=[s],{
+name:"Swift",keywords:i,contains:[a,e.C_LINE_COMMENT_MODE,n,{className:"type",
+begin:"\\b[A-Z][\\w\xc0-\u02b8']*[!?]"},{className:"type",
+begin:"\\b[A-Z][\\w\xc0-\u02b8']*",relevance:0},s,{className:"function",
+beginKeywords:"func",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{
+begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin:/</,end:/>/},{className:"params",
+begin:/\(/,end:/\)/,endsParent:!0,keywords:i,
+contains:["self",s,a,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],
+illegal:/\[|%/},{className:"class",
+beginKeywords:"struct protocol class extension enum",keywords:i,end:"\\{",
+excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{
+begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta",
+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|@main)\\b"
+},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n],relevance:0
+}]}}})()); \ No newline at end of file