summaryrefslogtreecommitdiff
path: root/src/pkg/json/scanner.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/json/scanner.go')
-rw-r--r--src/pkg/json/scanner.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pkg/json/scanner.go b/src/pkg/json/scanner.go
index c622bc679..c1934c8d9 100644
--- a/src/pkg/json/scanner.go
+++ b/src/pkg/json/scanner.go
@@ -181,6 +181,10 @@ func (s *scanner) popParseState() {
}
}
+func isSpace(c int) bool {
+ return c == ' ' || c == '\t' || c == '\r' || c == '\n'
+}
+
// NOTE(rsc): The various instances of
//
// if c <= ' ' && (c == ' ' || c == '\t' || c == '\r' || c == '\n')
@@ -590,7 +594,7 @@ func stateError(s *scanner, c int) int {
// error records an error and switches to the error state.
func (s *scanner) error(c int, context string) int {
s.step = stateError
- s.err = SyntaxError("invalid character '" + quoteChar(c) + "' " + context)
+ s.err = SyntaxError("invalid character " + quoteChar(c) + " " + context)
return scanError
}