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:
parent
45d7d5ebdf
commit
390177ba60
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user