diff --git a/parser.go b/parser.go index c2fbb3e..1b196b6 100644 --- a/parser.go +++ b/parser.go @@ -80,7 +80,7 @@ func Run(parser Parserish, input string, ws ...VoidParser) (result interface{}, ps.WS = ws[0] } - ret := Result{} + ret := Result{Input: input} p(ps, &ret) ps.WS(ps) diff --git a/result.go b/result.go index 6f0f819..13e2cd5 100644 --- a/result.go +++ b/result.go @@ -15,6 +15,7 @@ type Result struct { Token string Child []Result Result interface{} + Input string Start int End int }