本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
365B

  1. package jlexer
  2. import "fmt"
  3. // LexerError implements the error interface and represents all possible errors that can be
  4. // generated during parsing the JSON data.
  5. type LexerError struct {
  6. Reason string
  7. Offset int
  8. Data string
  9. }
  10. func (l *LexerError) Error() string {
  11. return fmt.Sprintf("parse error: %s near offset %d of '%s'", l.Reason, l.Offset, l.Data)
  12. }
上海开阖软件有限公司 沪ICP备12045867号-1