about summary refs log tree commit diff
path: root/src/bootstrap/parser.pry
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-07-13 22:49:17 +0200
committerBaitinq <[email protected]>2025-07-13 22:49:17 +0200
commite91e0917f9894ec01de9145be73e6217dcdf8aa1 (patch)
tree41d4e54635534aa2121500eaf11d90b738bf2209 /src/bootstrap/parser.pry
parentBoostrap: Support struct field access (diff)
downloadpry-lang-e91e0917f9894ec01de9145be73e6217dcdf8aa1.tar.gz
pry-lang-e91e0917f9894ec01de9145be73e6217dcdf8aa1.tar.bz2
pry-lang-e91e0917f9894ec01de9145be73e6217dcdf8aa1.zip
Boostrap: Support null
Diffstat (limited to '')
-rw-r--r--src/bootstrap/parser.pry6
1 files changed, 6 insertions, 0 deletions
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)));