From f868d02b08688c04509d1abda5af89a182033d88 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 21 Nov 2024 13:00:53 -0500 Subject: Add `NULL` as a syntax for null values. --- parse.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'parse.c') diff --git a/parse.c b/parse.c index 8aebb1d3..bc25e89b 100644 --- a/parse.c +++ b/parse.c @@ -1532,6 +1532,8 @@ PARSER(parse_lambda) { PARSER(parse_null) { const char *start = pos; + if (match_word(&pos, "NULL")) + return NewAST(ctx->file, start, pos, Null, .type=NULL); if (!match(&pos, "!")) return NULL; type_ast_t *type = parse_type(ctx, pos); if (!type) return NULL; -- cgit v1.2.3