From 8b2f10f2384c1efe4492f68b055415be6ead3f0e Mon Sep 17 00:00:00 2001 From: Adam Scarr Date: Wed, 9 Aug 2017 19:35:15 +1000 Subject: Rename some things --- json/json.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'json/json.go') 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 { -- cgit v1.2.3