summaryrefslogtreecommitdiff
path: root/decode_scan.go
diff options
context:
space:
mode:
Diffstat (limited to 'decode_scan.go')
-rw-r--r--decode_scan.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/decode_scan.go b/decode_scan.go
index 9fa6181..2830d0b 100644
--- a/decode_scan.go
+++ b/decode_scan.go
@@ -13,9 +13,10 @@ type runeTypeScanner interface {
// The returned error is a *ReadError, a *SyntaxError, or nil.
// An EOF condition is represented as one of:
//
- // end of value but not file: (_, >0, RuneTypeEOF, nil)
- // end of both value and file: (_, 0, RuneTypeEOF, nil)
- // end of file but not value: (_, 0, RuneTypeError, &DecodeSyntaxError{Offset: offset: Err: io.ErrUnexepctedEOF})
+ // end of value but not file: (_, >0, RuneTypeEOF, nil)
+ // end of both value and file: (_, 0, RuneTypeEOF, nil)
+ // end of file in middle of value: (_, 0, RuneTypeError, &DecodeSyntaxError{Offset: offset: Err: io.ErrUnexepctedEOF})
+ // end of file at start of value: (_, 0, RuneTypeError, &DecodeSyntaxError{Offset: offset: Err: io.EOF})
ReadRuneType() (rune, int, RuneType, error)
// The returned error is a *DecodeReadError, a *DecodeSyntaxError, io.EOF, or nil.
ReadRune() (rune, int, error)
@@ -127,8 +128,6 @@ func (sc *runeTypeScannerImpl) ReadRune() (rune, int, error) {
}
}
-var ErrInvalidUnreadRune = errors.New("lowmemjson: invalid use of UnreadRune")
-
// UnreadRune undoes a call to .ReadRune() or .ReadRuneType().
//
// If the last call to .ReadRune() or .ReadRuneType() has already been