aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.c
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-05-04 15:43:47 +0900
committernsfisis <nsfisis@gmail.com>2025-05-04 15:43:47 +0900
commit55f2e9c33f8e61e19da4a52fc6a04cdf7dd770c4 (patch)
tree33b92af071da3d3895ae432e9323b27fa173ddac /main.c
parente121612e7636a32f6b3b1944c41a45c190984f3d (diff)
downloadP4Dcc-55f2e9c33f8e61e19da4a52fc6a04cdf7dd770c4.tar.gz
P4Dcc-55f2e9c33f8e61e19da4a52fc6a04cdf7dd770c4.tar.zst
P4Dcc-55f2e9c33f8e61e19da4a52fc6a04cdf7dd770c4.zip
define NULL
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.c b/main.c
index 6e90c75..c8431b1 100644
--- a/main.c
+++ b/main.c
@@ -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);