mirror of https://github.com/golang/go.git
text/scanner: add required ScanComments in example
Fixes #71133 Change-Id: I11f792bf4cb275e7bc3585cd92a4b327a3b6e368 Reviewed-on: https://go-review.googlesource.com/c/go/+/646036 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
3a81ebea0d
commit
3caf5bd09e
|
|
@ -50,7 +50,7 @@ func (pos Position) String() string {
|
|||
// to configure a [Scanner] such that it only recognizes (Go) identifiers,
|
||||
// integers, and skips comments, set the Scanner's Mode field to:
|
||||
//
|
||||
// ScanIdents | ScanInts | SkipComments
|
||||
// ScanIdents | ScanInts | ScanComments | SkipComments
|
||||
//
|
||||
// With the exceptions of comments, which are skipped if SkipComments is
|
||||
// set, unrecognized tokens are not ignored. Instead, the scanner simply
|
||||
|
|
|
|||
Loading…
Reference in New Issue