From 19249bf828534a26cdb67dcb517c7831516aa11a Mon Sep 17 00:00:00 2001 From: Fernando Carmona Varo Date: Sat, 12 Oct 2019 12:51:49 +0200 Subject: [PATCH] Be a bit more helpful when describing syntax error --- src/u_scanner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/u_scanner.c b/src/u_scanner.c index 81ad8323..d8d17376 100644 --- a/src/u_scanner.c +++ b/src/u_scanner.c @@ -451,7 +451,7 @@ void U_ErrorToken(u_scanner_t* s, int token) else if (token < TK_NumSpecialTokens && s->token >= TK_NumSpecialTokens) U_Error(s, "Expected %s but got '%c' instead.", U_TokenNames[token], s->token); else if (token >= TK_NumSpecialTokens && s->token < TK_NumSpecialTokens) - U_Error(s, "Expected '%c' but got '%s' instead.", token, U_TokenNames[(int)s->token]); + U_Error(s, "Expected '%c' but got %s '%s' instead.", token, U_TokenNames[(int)s->token], s->string); else U_Error(s, "Expected '%c' but got '%c' instead.", token, s->token); }