mirror of
https://github.com/netbirdio/easyjson.git
synced 2026-05-22 18:44:42 -07:00
Merge pull request #118 from Raynos/patch-1
Update lexer.Consumed() to not overwrite existing error
This commit is contained in:
+2
-2
@@ -582,11 +582,11 @@ func (r *Lexer) Consumed() {
|
||||
|
||||
for _, c := range r.Data[r.pos:] {
|
||||
if c != ' ' && c != '\t' && c != '\r' && c != '\n' {
|
||||
r.fatalError = &LexerError{
|
||||
r.AddError(&LexerError{
|
||||
Reason: "invalid character '" + string(c) + "' after top-level value",
|
||||
Offset: r.pos,
|
||||
Data: string(r.Data[r.pos:]),
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user