Skip to content

Commit

Permalink
Be a bit more helpful when describing syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferk committed Oct 12, 2019
1 parent e21b182 commit 19249bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/u_scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 19249bf

Please sign in to comment.