aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/text
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2012-02-09 15:26:08 -0800
committerRobert Griesemer <gri@golang.org>2012-02-09 15:26:08 -0800
commit88a9e76e28d037d77aa1faef813c40189892e358 (patch)
tree6700c4ba8d1e5a9516fa1526f76ce2b830c4f998 /src/pkg/text
parent9cd4a0467ae2494b0734693b90d47c604610a9ac (diff)
downloadgo-88a9e76e28d037d77aa1faef813c40189892e358.tar.xz
text/scanner: update comments
Fixes #2962. R=rsc CC=golang-dev https://golang.org/cl/5652048
Diffstat (limited to 'src/pkg/text')
-rw-r--r--src/pkg/text/scanner/scanner.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pkg/text/scanner/scanner.go b/src/pkg/text/scanner/scanner.go
index f46f63d0ee..565650edf9 100644
--- a/src/pkg/text/scanner/scanner.go
+++ b/src/pkg/text/scanner/scanner.go
@@ -5,8 +5,7 @@
// Package scanner provides a scanner and tokenizer for UTF-8-encoded text.
// It takes an io.Reader providing the source, which then can be tokenized
// through repeated calls to the Scan function. For compatibility with
-// existing tools, the NUL character is not allowed (implementation
-// restriction).
+// existing tools, the NUL character is not allowed.
//
// By default, a Scanner skips white space and Go comments and recognizes all
// literals as defined by the Go language specification. It may be
@@ -104,7 +103,7 @@ var tokenString = map[rune]string{
Comment: "Comment",
}
-// TokenString returns a (visible) string for a token or Unicode character.
+// TokenString returns a printable string for a token or Unicode character.
func TokenString(tok rune) string {
if s, found := tokenString[tok]; found {
return s
@@ -287,7 +286,7 @@ func (s *Scanner) next() rune {
// special situations
switch ch {
case 0:
- // implementation restriction for compatibility with other tools
+ // for compatibility with other tools
s.error("illegal character NUL")
case '\n':
s.line++