summaryrefslogtreecommitdiff
path: root/result.go
diff options
context:
space:
mode:
authorAdam Scarr <adam@vektah.net>2017-08-13 21:20:41 +1000
committerAdam Scarr <adam@vektah.net>2017-08-13 21:20:41 +1000
commit139e7606f4ab68b469438956c378745f51f7b65b (patch)
tree2eaa9cb87e008ecaffefc01c5da933f1ea9852dd /result.go
parent1c37779bd46d988c9e7b4bdb846b9daa89856b7c (diff)
Update benchmarks
Diffstat (limited to 'result.go')
-rw-r--r--result.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/result.go b/result.go
index cdad054..21440eb 100644
--- a/result.go
+++ b/result.go
@@ -5,6 +5,7 @@ import (
"strings"
)
+// TrashResult is used in places where the result isnt wanted, but something needs to be passed in to satisfy the interface.
var TrashResult = &Result{}
// Result is the output of a parser. Usually only one of its fields will be set and should be though of
@@ -16,6 +17,7 @@ type Result struct {
Result interface{}
}
+// String stringifies a node. This is only called from debug code.
func (r Result) String() string {
if r.Result != nil {
if rs, ok := r.Result.(fmt.Stringer); ok {