diff options
author | Adam Scarr <adam@vektah.net> | 2017-08-13 21:20:41 +1000 |
---|---|---|
committer | Adam Scarr <adam@vektah.net> | 2017-08-13 21:20:41 +1000 |
commit | 139e7606f4ab68b469438956c378745f51f7b65b (patch) | |
tree | 2eaa9cb87e008ecaffefc01c5da933f1ea9852dd /result.go | |
parent | 1c37779bd46d988c9e7b4bdb846b9daa89856b7c (diff) |
Update benchmarks
Diffstat (limited to 'result.go')
-rw-r--r-- | result.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 { |