mirror of https://github.com/rui314/chibicc
Add #error
This commit is contained in:
parent
a939a7a906
commit
e7fdc2e3f1
|
@ -769,6 +769,9 @@ static Token *preprocess2(Token *tok) {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (equal(tok, "error"))
|
||||
error_tok(tok, "error");
|
||||
|
||||
// `#`-only line is legal. It's called a null directive.
|
||||
if (tok->at_bol)
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue