From e91e0917f9894ec01de9145be73e6217dcdf8aa1 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sun, 13 Jul 2025 22:49:17 +0200 Subject: Boostrap: Support null --- src/bootstrap/parser.pry | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/bootstrap/parser.pry') diff --git a/src/bootstrap/parser.pry b/src/bootstrap/parser.pry index 155244f..cf3c233 100644 --- a/src/bootstrap/parser.pry +++ b/src/bootstrap/parser.pry @@ -814,6 +814,12 @@ let parser_parse_primary_expression = (p: *parser) => *Node { printf("NO TOK\n"); return cast(*Node, null); }; + + if (*tok).type == TOKEN_NULL { + let n = Node{}; + n.type = NODE_PRIMARY_EXPRESSION_NULL; + return create_node(p, n); + }; if (*tok).type == TOKEN_IDENTIFIER { let d = cast(*NODE_PRIMARY_EXPRESSION_IDENTIFIER_DATA, arena_alloc((*p).arena, sizeof(NODE_PRIMARY_EXPRESSION_IDENTIFIER_DATA))); -- cgit 1.4.1