SwiftGrammar: Enable delimiters and syntax rules to be mutated
This enables easy creation of custom grammars that are based on the Swift one.
This commit is contained in:
parent
30b9300441
commit
98bfad4ea4
@ -9,8 +9,8 @@ import Foundation
|
|||||||
/// Grammar for the Swift language. Use this implementation when
|
/// Grammar for the Swift language. Use this implementation when
|
||||||
/// highlighting Swift code. This is the default grammar.
|
/// highlighting Swift code. This is the default grammar.
|
||||||
public struct SwiftGrammar: Grammar {
|
public struct SwiftGrammar: Grammar {
|
||||||
public let delimiters: CharacterSet
|
public var delimiters: CharacterSet
|
||||||
public let syntaxRules: [SyntaxRule]
|
public var syntaxRules: [SyntaxRule]
|
||||||
|
|
||||||
public init() {
|
public init() {
|
||||||
var delimiters = CharacterSet.alphanumerics.inverted
|
var delimiters = CharacterSet.alphanumerics.inverted
|
||||||
|
Loading…
x
Reference in New Issue
Block a user