From 98bfad4ea4ee80b8cb69d68b04abfc23416d2b72 Mon Sep 17 00:00:00 2001 From: John Sundell Date: Fri, 28 Sep 2018 13:52:51 +0200 Subject: [PATCH] SwiftGrammar: Enable delimiters and syntax rules to be mutated This enables easy creation of custom grammars that are based on the Swift one. --- Sources/Splash/Grammar/SwiftGrammar.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Splash/Grammar/SwiftGrammar.swift b/Sources/Splash/Grammar/SwiftGrammar.swift index 591aef3..b987146 100644 --- a/Sources/Splash/Grammar/SwiftGrammar.swift +++ b/Sources/Splash/Grammar/SwiftGrammar.swift @@ -9,8 +9,8 @@ import Foundation /// Grammar for the Swift language. Use this implementation when /// highlighting Swift code. This is the default grammar. public struct SwiftGrammar: Grammar { - public let delimiters: CharacterSet - public let syntaxRules: [SyntaxRule] + public var delimiters: CharacterSet + public var syntaxRules: [SyntaxRule] public init() { var delimiters = CharacterSet.alphanumerics.inverted