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:
parent
409cca5b8d
commit
b16367635b
@ -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))) }
|
||||
|
Loading…
Reference in New Issue
Block a user