Make it possible to compile redbean with chibicc

This cuts build latency down from 5 seconds to 500 milliseconds.
This commit is contained in:
Justine Tunney 2022-04-22 15:03:32 -07:00
parent 552525cbdd
commit 6ff46ca373
50 changed files with 898 additions and 824 deletions

View file

@ -97,10 +97,12 @@ bool consume(Token **rest, Token *tok, char *str, size_t n) {
// Ensure that the current token is `op`.
Token *skip(Token *tok, char op) {
while (tok->kind == TK_JAVADOWN) {
tok = tok->next;
}
if (tok->len == 1 && *tok->loc == op) {
return tok->next;
} else {
// __die();
error_tok(tok, "expected '%c'", op);
}
}