summaryrefslogtreecommitdiff
path: root/json/json.go
diff options
context:
space:
mode:
authorAdam Scarr <adam@vektah.net>2017-08-09 19:35:15 +1000
committerAdam Scarr <adam@vektah.net>2017-08-09 19:37:32 +1000
commit8b2f10f2384c1efe4492f68b055415be6ead3f0e (patch)
treed52e01062216428a8706158fff92a0149f68dff6 /json/json.go
parentb62ae2f567231357d4d80a3a222d084f650793de (diff)
Rename some things
Diffstat (limited to 'json/json.go')
-rw-r--r--json/json.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/json/json.go b/json/json.go
index 724e020..e2ab252 100644
--- a/json/json.go
+++ b/json/json.go
@@ -10,9 +10,9 @@ var (
_false = Bind("false", false)
_string = StringLit(`"`)
_number = NumberLit()
- _properties = Kleene(And(StringLit(`"`), ":", &_value), ",")
+ _properties = Some(Seq(StringLit(`"`), ":", &_value), ",")
- _array = Map(And("[", Kleene(&_value, ","), "]"), func(n Node) Node {
+ _array = Map(Seq("[", Some(&_value, ","), "]"), func(n Node) Node {
ret := []interface{}{}
for _, child := range n.Child[1].Child {
ret = append(ret, child.Result)
@@ -20,7 +20,7 @@ var (
return Node{Result: ret}
})
- _object = Map(And("{", _properties, "}"), func(n Node) Node {
+ _object = Map(Seq("{", _properties, "}"), func(n Node) Node {
ret := map[string]interface{}{}
for _, prop := range n.Child[1].Child {