diff options
| author | Baitinq <[email protected]> | 2025-07-13 22:49:17 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-07-13 22:49:17 +0200 |
| commit | e91e0917f9894ec01de9145be73e6217dcdf8aa1 (patch) | |
| tree | 41d4e54635534aa2121500eaf11d90b738bf2209 /src/bootstrap/parser.pry | |
| parent | Boostrap: Support struct field access (diff) | |
| download | pry-lang-e91e0917f9894ec01de9145be73e6217dcdf8aa1.tar.gz pry-lang-e91e0917f9894ec01de9145be73e6217dcdf8aa1.tar.bz2 pry-lang-e91e0917f9894ec01de9145be73e6217dcdf8aa1.zip | |
Boostrap: Support null
Diffstat (limited to 'src/bootstrap/parser.pry')
| -rw-r--r-- | src/bootstrap/parser.pry | 6 |
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))); |