1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00

remove type declarations

This commit is contained in:
joshvera 2015-10-16 11:14:13 -04:00
parent 409cca5b8d
commit b16367635b

View File

@ -138,12 +138,12 @@ let json: JSONParser = fix { json in
let array: JSONParser = %"[" *> json* <* %"]" --> { Cofree($1, .Indexed($2)) }
let dict: JSONParser =
(%"{" *>
%"{" *>
(curry(pair) <^> quoted <* String.lift(%":") <*> json)*
<* %"}")
--> { (_, range: Range<String.Index>, values: [(String, CofreeJSON)]) in
Cofree(range, .Keyed(Dictionary(elements: values)))
}
<* %"}"
--> { (_, range, values) in
Cofree(range, .Keyed(Dictionary(elements: values)))
}
// TODO: Parse Numbers correctly
let number: JSONParser = %"0" --> { Cofree($1, .Leaf(.String($2))) }