diff --git a/prototype/Doubt/Swift.swift b/prototype/Doubt/Swift.swift index 5790b1cd5..2ce8dcece 100644 --- a/prototype/Doubt/Swift.swift +++ b/prototype/Doubt/Swift.swift @@ -1,4 +1,5 @@ enum Swift: Equatable { + case Atom(String) case KeyValue(String, String) case Branch(String, [Swift]) @@ -12,7 +13,7 @@ enum Swift: Equatable { static let keyValue = KeyValue <^> (word <* ^"=" <*> (quoted <|> atom)) static let branch: String -> State? = Branch <^> (^"(" *> ws* *> word <* ws* <*> sexpr* <* ws* <* ^")") - static let sexpr = delay { (branch <|> keyValue) <* ws* } + static let sexpr = delay { (branch <|> (Swift.Atom <^> atom) <|> keyValue) <* ws* } } }