From acd48fdfa4653dbeffd41f6b773ae4552e6c55bc Mon Sep 17 00:00:00 2001 From: Adam Scarr Date: Tue, 8 Aug 2017 23:11:47 +1000 Subject: Add readme and calc example --- combinator_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'combinator_test.go') diff --git a/combinator_test.go b/combinator_test.go index 4ac96b1..401c5d6 100644 --- a/combinator_test.go +++ b/combinator_test.go @@ -140,7 +140,7 @@ type htmlTag struct { func TestMap(t *testing.T) { parser := Map(And("<", Chars("a-zA-Z0-9"), ">"), func(n Node) Node { - return Node{Result: htmlTag{n.Children[1].Token}} + return Node{Result: htmlTag{n.Child[1].Token}} }) t.Run("sucess", func(t *testing.T) { @@ -182,7 +182,7 @@ func assertSequence(t *testing.T, node Node, expected ...string) { require.NotNil(t, node) actual := []string{} - for _, child := range node.Children { + for _, child := range node.Child { actual = append(actual, child.Token) } -- cgit v1.2.3