You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering whether is is expected that both p.lineComment
and p.leadComment might be populated at the same time.
i.e. whether parser.go:275 can be changed from:
if p.lineFor(p.pos) != endline || p.tok == token.SEMICOLON || p.tok == token.EOF
to:
if (p.tok != token.COMMENT && p.lineFor(p.pos) != endline) || p.tok == token.SEMICOLON || p.tok == token.EOF
It turns out that we cannot do so. So while i am here, add a test
case for that, since nothing else failed with that change.
Change-Id: I6a6a6964f760237c068098db8a7b4b7aaf26c651
Reviewed-on: https://go-review.googlesource.com/c/go/+/703915
Reviewed-by: Michael Knyszek <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
0 commit comments