diff --git a/ch7/eval/parse.go b/ch7/eval/parse.go index e68f8f5..accd570 100644 --- a/ch7/eval/parse.go +++ b/ch7/eval/parse.go @@ -130,7 +130,7 @@ func parsePrimary(lex *lexer) Expr { lex.next() // consume ',' } if lex.token != ')' { - msg := fmt.Sprintf("got %q, want ')'", lex.token) + msg := fmt.Sprintf("got %s, want ')'", lex.describe()) panic(lexPanic(msg)) } }