1
0
mirror of https://github.com/golang/go synced 2024-11-17 18:44:44 -07:00

go/scanner: use constant name rather than its value (cleanup)

Change-Id: I3fcd1683870f66a1d65e2acf0beaf1046e7f5446
Reviewed-on: https://go-review.googlesource.com/c/go/+/407535
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
This commit is contained in:
Park Zhou 2022-05-13 09:36:52 +08:00 committed by Gopher Robot
parent acfdaf06f5
commit 2b21a27f82

View File

@ -820,7 +820,7 @@ scanAgain:
default:
s.next() // always make progress
switch ch {
case -1:
case eof:
if s.insertSemi {
s.insertSemi = false // EOF consumed
return pos, token.SEMICOLON, "\n"