From c43e8a9a73e1e65db686f3928d247648d5fd6898 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 30 Nov 2024 23:25:16 -0500 Subject: [PATCH] Fix crash on Linux --- Sources/Splash/Grammar/SwiftGrammar.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/Splash/Grammar/SwiftGrammar.swift b/Sources/Splash/Grammar/SwiftGrammar.swift index 79a98d5..cc07d9c 100644 --- a/Sources/Splash/Grammar/SwiftGrammar.swift +++ b/Sources/Splash/Grammar/SwiftGrammar.swift @@ -13,7 +13,9 @@ public struct SwiftGrammar: Grammar { public var syntaxRules: [SyntaxRule] public init() { - var delimiters = CharacterSet.alphanumerics.inverted + var delimiters = CharacterSet.alphanumerics + // Using the .inverted property crashes on Linux + delimiters.invert() delimiters.remove("_") delimiters.remove("\"") delimiters.remove("#")