1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

Use concat.

This commit is contained in:
Rob Rix 2015-09-18 15:37:53 -04:00
parent 08d07baef7
commit a918261abc

View File

@ -6,7 +6,7 @@ enum Swift: Equatable {
static let alphabetic = ^"abcdefghijklmnopqrstuvwxyz".characters static let alphabetic = ^"abcdefghijklmnopqrstuvwxyz".characters
static let ws = ^" \t\n".characters static let ws = ^" \t\n".characters
static let word = { $0.joinWithSeparator("") } <^> alphabetic+ static let word = concat <^> alphabetic+
static let quoted = join(^"'", join((concat <^> not(^"'")*), ^"'")) static let quoted = join(^"'", join((concat <^> not(^"'")*), ^"'"))
static let keyValue = KeyValue <^> (word <* ^"=" <*> (quoted <|> (concat <^> not(ws <|> ^")")*))) static let keyValue = KeyValue <^> (word <* ^"=" <*> (quoted <|> (concat <^> not(ws <|> ^")")*)))