diff options
Diffstat (limited to 'src/3p/chibicc')
-rw-r--r-- | src/3p/chibicc/chibicc.h | 4 | ||||
-rw-r--r-- | src/3p/chibicc/tokenize.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/3p/chibicc/chibicc.h b/src/3p/chibicc/chibicc.h index dd810ec..2a80ecf 100644 --- a/src/3p/chibicc/chibicc.h +++ b/src/3p/chibicc/chibicc.h @@ -7,7 +7,7 @@ #include <ctype.h> #include <errno.h> #include <stdarg.h> -#include <stdbool.h> +//#include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -93,7 +93,7 @@ _Noreturn void error(char *fmt, ...) __attribute__((format(printf, 1, 2))); _Noreturn void error_at(char *loc, char *fmt, ...) __attribute__((format(printf, 2, 3))); _Noreturn void error_tok(Token *tok, char *fmt, ...) __attribute__((format(printf, 2, 3))); void warn_tok(Token *tok, char *fmt, ...) __attribute__((format(printf, 2, 3))); -bool equal(Token *tok, char *op); +bool equal(const Token *tok, const char *op); Token *skip(Token *tok, char *op); bool consume(Token **rest, Token *tok, char *str); void convert_pp_tokens(Token *tok); diff --git a/src/3p/chibicc/tokenize.c b/src/3p/chibicc/tokenize.c index 8ed414e..3b15df9 100644 --- a/src/3p/chibicc/tokenize.c +++ b/src/3p/chibicc/tokenize.c @@ -77,7 +77,7 @@ void warn_tok(Token *tok, char *fmt, ...) { } // Consumes the current token if it matches `op`. -bool equal(Token *tok, char *op) { +bool equal(const Token *tok, const char *op) { return memcmp(tok->loc, op, tok->len) == 0 && op[tok->len] == '\0'; } |