diff options
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -133,14 +133,9 @@ peek(int kind) char * expect(enum tokenkind kind, const char *msg) { - char *lit, want[64], got[64]; + char *lit; - if (tok.kind != kind) { - tokendesc(want, sizeof(want), kind, NULL); - tokendesc(got, sizeof(got), tok.kind, tok.lit); - error(&tok.loc, "expected %s %s, saw %s", want, msg, got); - } - lit = tok.lit; + lit = tokencheck(&tok, kind, msg); next(); return lit; |