mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-08 12:18:31 +00:00
Make it possible to compile redbean with chibicc
This cuts build latency down from 5 seconds to 500 milliseconds.
This commit is contained in:
parent
552525cbdd
commit
6ff46ca373
50 changed files with 898 additions and 824 deletions
4
third_party/chibicc/tokenize.c
vendored
4
third_party/chibicc/tokenize.c
vendored
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue