Commit 07b72d91 authored by Robert Griesemer's avatar Robert Griesemer

go/parser: use valid position when reporting an error (copy-paste bug)

This is a follow-up on https://golang.org/cl/202581.

Updates #33649.

Change-Id: Ib078fed983792c5493bdbed6d33e21b86856894a
Reviewed-on: https://go-review.googlesource.com/c/go/+/204041
Run-TryBot: Robert Griesemer <gri@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: default avatarRebecca Stambler <rstambler@golang.org>
parent 1d4369fa
......@@ -403,7 +403,7 @@ func (p *parser) expect2(tok token.Token) (pos token.Pos) {
if p.tok == tok {
pos = p.pos
} else {
p.errorExpected(pos, "'"+tok.String()+"'")
p.errorExpected(p.pos, "'"+tok.String()+"'")
}
p.next() // make progress
return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment