Skip to content

Commit

Permalink
Merge pull request #24 from HassanTaleb90/swiftLexer-fixes
Browse files Browse the repository at this point in the history
adding "do" to keywords
  • Loading branch information
twostraws authored Aug 12, 2021
2 parents 55ec0a3 + d11ef72 commit 04f7e85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Sourceful/Languages/SwiftLexer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class SwiftLexer: SourceCodeRegexLexer {

generators.append(regexGenerator("\\.[A-Za-z_]+\\w*", tokenType: .identifier))

let keywords = "as associatedtype async await break case catch class continue convenience default defer deinit else enum extension fallthrough false fileprivate final for func get guard if import in init inout internal is lazy let mutating nil nonmutating open operator override private protocol public repeat required rethrows return required self set static struct subscript super switch throw throws true try typealias unowned var weak where while".components(separatedBy: " ")
let keywords = "as associatedtype async await break case catch class continue convenience default defer deinit do else enum extension fallthrough false fileprivate final for func get guard if import in init inout internal is lazy let mutating nil nonmutating open operator override private protocol public repeat required rethrows return required self set static struct subscript super switch throw throws true try typealias unowned var weak where while".components(separatedBy: " ")

generators.append(keywordGenerator(keywords, tokenType: .keyword))

Expand Down

0 comments on commit 04f7e85

Please sign in to comment.