diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-05-04 15:43:47 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-05-04 15:43:47 +0900 |
| commit | 55f2e9c33f8e61e19da4a52fc6a04cdf7dd770c4 (patch) | |
| tree | 33b92af071da3d3895ae432e9323b27fa173ddac /main.c | |
| parent | e121612e7636a32f6b3b1944c41a45c190984f3d (diff) | |
| download | P4Dcc-55f2e9c33f8e61e19da4a52fc6a04cdf7dd770c4.tar.gz P4Dcc-55f2e9c33f8e61e19da4a52fc6a04cdf7dd770c4.tar.zst P4Dcc-55f2e9c33f8e61e19da4a52fc6a04cdf7dd770c4.zip | |
define NULL
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -16,6 +16,8 @@ int strcmp(); char* strstr(); long strtol(); +#define NULL 0 + void fatal_error(char* msg) { printf("%s\n", msg); exit(1); @@ -774,7 +776,7 @@ AST* parse_if_stmt(PARSER* p) { AST* cond = parse_expr(p); expect(p, TK_PAREN_R); AST* then_body = parse_stmt(p); - AST* else_body = 0; + AST* else_body = NULL; if (peek_token(p)->kind == TK_K_ELSE) { next_token(p); else_body = parse_stmt(p); |
