aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/scanner/scanner.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-05-20 00:18:15 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-05-20 00:18:15 +0000
commit9ff56c9570642711d5b7ab29920ecf5dbff14a27 (patch)
treec891bdec1e6f073f73fedeef23718bc3ac30d499 /libgo/go/scanner/scanner.go
parent37cb25ed7acdb844b218231130e54b8b7a0ff6e6 (diff)
downloadgcc-9ff56c9570642711d5b7ab29920ecf5dbff14a27.zip
gcc-9ff56c9570642711d5b7ab29920ecf5dbff14a27.tar.gz
gcc-9ff56c9570642711d5b7ab29920ecf5dbff14a27.tar.bz2
Update to current version of Go library.
From-SVN: r173931
Diffstat (limited to 'libgo/go/scanner/scanner.go')
-rw-r--r--libgo/go/scanner/scanner.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/libgo/go/scanner/scanner.go b/libgo/go/scanner/scanner.go
index 560e595..e79d392 100644
--- a/libgo/go/scanner/scanner.go
+++ b/libgo/go/scanner/scanner.go
@@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// A scanner and tokenizer for UTF-8-encoded text. 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).
+// 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).
//
// By default, a Scanner skips white space and Go comments and recognizes all
// literals as defined by the Go language specification. It may be
@@ -115,7 +116,7 @@ func TokenString(tok int) string {
if s, found := tokenString[tok]; found {
return s
}
- return fmt.Sprintf("U+%04X", tok)
+ return fmt.Sprintf("%q", string(tok))
}