1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 08:54:14 +03:00

Drop a couple of bindings.

This commit is contained in:
Rob Rix 2015-10-27 16:22:12 -04:00
parent 3b21c087a0
commit db6bfbb85c

View File

@ -78,10 +78,8 @@ public let json: JSONParser = fix { json in
Cofree(range, .Keyed(Dictionary(elements: values))) Cofree(range, .Keyed(Dictionary(elements: values)))
} <?> "object" } <?> "object"
let doubleParser: DoubleParser = number let numberParser: JSONParser = (number --> { _, range, value in
let numberParser: JSONParser = (doubleParser --> { _, range, value in Cofree(range, .Leaf(JSONLeaf.Number(value)))
let num = JSONLeaf.Number(value)
return Cofree(range, .Leaf(num))
}) <?> "number" }) <?> "number"
let null: JSONParser = %"null" --> { (_, range, value) in let null: JSONParser = %"null" --> { (_, range, value) in