1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Words can contain _.

This commit is contained in:
Rob Rix 2015-09-18 15:38:05 -04:00
parent a918261abc
commit abb63b7c4d

View File

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