remember input string in result

This commit is contained in:
Özgür Kesim 2019-11-28 15:43:52 +01:00
parent 29336c8a7a
commit 5173c86ded
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -15,6 +15,7 @@ type Result struct {
Token string
Child []Result
Result interface{}
Input string
Start int
End int
}