From f0a1de6dbc103be9a8a2723b02b0b0545b010453 Mon Sep 17 00:00:00 2001 From: Casper Zandbergen Date: Sat, 2 May 2026 10:59:47 +0200 Subject: [PATCH] Fixed crash on Linux void CFCharacterSetRemoveCharactersInRange(CFMutableCharacterSetRef, CFRange): Immutable character set passed to mutable function --- Sources/Splash/Grammar/SwiftGrammar.swift | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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(),