summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index b1b5c93..609e8a6 100644
--- a/parse.c
+++ b/parse.c
@@ -10,8 +10,11 @@ int parse(const Token *tok)
case TOK_KW_CONST:
break;
default:
- fprintf(stderr, "unexpected %s at %u:%u\n",
+ fprintf(stderr, "unexpected %s %s%s%sat %u:%u\n",
token_type_str(tok->type),
+ (tok->s != NULL) ? "(" : "",
+ (tok->s != NULL) ? tok->s : "",
+ (tok->s != NULL) ? ") " : "",
tok->line, tok->column);
return 1;
}