diff --git a/Sources/Splash/Grammar/SwiftGrammar.swift b/Sources/Splash/Grammar/SwiftGrammar.swift index 79a98d5..3ffd142 100644 --- a/Sources/Splash/Grammar/SwiftGrammar.swift +++ b/Sources/Splash/Grammar/SwiftGrammar.swift @@ -13,13 +13,8 @@ public struct SwiftGrammar: Grammar { public var syntaxRules: [SyntaxRule] public init() { - var delimiters = CharacterSet.alphanumerics.inverted - delimiters.remove("_") - delimiters.remove("\"") - delimiters.remove("#") - delimiters.remove("@") - delimiters.remove("$") - self.delimiters = delimiters + let notDelimiters = CharacterSet(charactersIn: "_\"#@$") + self.delimiters = CharacterSet.alphanumerics.union(notDelimiters).inverted syntaxRules = [ PreprocessingRule(),