diff options
Diffstat (limited to 'literals.go')
-rw-r--r-- | literals.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/literals.go b/literals.go index 00e39f9..260a26e 100644 --- a/literals.go +++ b/literals.go @@ -6,7 +6,7 @@ import ( "unicode/utf8" ) -// StringLit matches a quoted string and returns it in .Result. It may contain: +// StringLit matches a quoted string and returns it in .Token. It may contain: // - unicode // - escaped characters, eg \" or \n // - unicode sequences, eg \uBEEF @@ -59,12 +59,12 @@ func StringLit(allowedQuotes string) Parser { } case quote: if buf == nil { - node.Result = ps.Input[ps.Pos+1 : end] + node.Token = ps.Input[ps.Pos+1 : end] ps.Pos = end + 1 return } ps.Pos = end + 1 - node.Result = buf.String() + node.Token = buf.String() return default: if buf == nil { |