Skip to content
Permalink
Browse files
Swift: Added support for isolated keyword (#3174)
  • Loading branch information
AvdLee committed Nov 1, 2021
1 parent 79f250f commit 18c828a60b1eff5428a7fa0e2b991ba703373aaf
Showing with 4 additions and 2 deletions.
  1. +1 −1 components/prism-swift.js
  2. +1 −1 components/prism-swift.min.js
  3. +2 −0 tests/languages/swift/keyword_feature.test
@@ -117,7 +117,7 @@ Prism.languages.swift = {
alias: 'important'
},

'keyword': /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,
'keyword': /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,
'boolean': /\b(?:false|true)\b/,
'nil': {
pattern: /\bnil\b/,

Some generated files are not rendered by default. Learn more.

@@ -41,6 +41,7 @@ init
inout
internal
is
isolated
lazy
left
let
@@ -131,6 +132,7 @@ willSet
["keyword", "inout"],
["keyword", "internal"],
["keyword", "is"],
["keyword", "isolated"],
["keyword", "lazy"],
["keyword", "left"],
["keyword", "let"],

0 comments on commit 18c828a

Please sign in to comment.