summaryrefslogtreecommitdiffstats
path: root/libgo/go/text/template/parse/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/text/template/parse/parse.go')
-rw-r--r--libgo/go/text/template/parse/parse.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/text/template/parse/parse.go b/libgo/go/text/template/parse/parse.go
index 250cad5f353..c0fb9274a3d 100644
--- a/libgo/go/text/template/parse/parse.go
+++ b/libgo/go/text/template/parse/parse.go
@@ -151,7 +151,7 @@ func (t *Tree) error(err error) {
func (t *Tree) expect(expected itemType, context string) item {
token := t.nextNonSpace()
if token.typ != expected {
- t.errorf("expected %s in %s; got %s", expected, context, token)
+ t.unexpected(token, context)
}
return token
}
@@ -160,7 +160,7 @@ func (t *Tree) expect(expected itemType, context string) item {
func (t *Tree) expectOneOf(expected1, expected2 itemType, context string) item {
token := t.nextNonSpace()
if token.typ != expected1 && token.typ != expected2 {
- t.errorf("expected %s or %s in %s; got %s", expected1, expected2, context, token)
+ t.unexpected(token, context)
}
return token
}
OpenPOWER on IntegriCloud