1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 11:04:00 +03:00

Use noneOf for performance

This commit is contained in:
joshvera 2015-10-20 15:28:52 -04:00
parent 45d7d5ebdf
commit 390177ba60

View File

@ -45,7 +45,7 @@ let whitespace: CharacterParser = String.lift(satisfy({ whitespaceChars.contains
// Quoted strings parser
let stringBody: StringParser = { $0.map({ String($0) }).joinWithSeparator("") } <^>
not(%"\\" <|> %"\"")*
String.lift(noneOf("\n\"")*)
let quoted = %"\"" *> stringBody <* %"\"" <* whitespace
typealias MembersParser = Parser<String, [(String, CofreeJSON)]>.Function;