Fix crash on Linux

This commit is contained in:
Shadowfacts 2024-11-30 23:25:16 -05:00
parent 2e3f17c2d0
commit c43e8a9a73
1 changed files with 3 additions and 1 deletions

View File

@ -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("#")