From a733d0ae1391dc8642d21f8784696e95047b7923 Mon Sep 17 00:00:00 2001 From: Adam Scarr Date: Sun, 13 Aug 2017 19:50:41 +1000 Subject: Improve debugging output --- parser.go | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'parser.go') diff --git a/parser.go b/parser.go index 763eff4..fecf635 100644 --- a/parser.go +++ b/parser.go @@ -7,17 +7,6 @@ import ( "unicode/utf8" ) -var TrashResult = &Result{} - -// Result is the output of a parser. Usually only one of its fields will be set and should be though of -// more as a union type. having it avoids interface{} littered all through the parsing code and makes -// the it easy to do the two most common operations, getting a token and finding a child. -type Result struct { - Token string - Child []Result - Result interface{} -} - // Parser is the workhorse of parsify. A parser takes a State and returns a result, consuming some // of the State in the process. // Given state is shared there are a few rules that should be followed: @@ -64,10 +53,6 @@ func Parsify(p Parserish) Parser { } case string: return Exact(p) - case VoidParser: - return func(ptr *State, node *Result) { - p(ptr) - } case func(*State): return func(ptr *State, node *Result) { p(ptr) -- cgit v1.2.3