diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-21 13:00:53 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-21 13:00:53 -0500 |
| commit | f868d02b08688c04509d1abda5af89a182033d88 (patch) | |
| tree | af64c48127e0edfebb348edabbccbcc402d2070b /parse.c | |
| parent | 90573ba7a15bb47a11c1eb6f69ed04c01b69724d (diff) | |
Add `NULL` as a syntax for null values.
Diffstat (limited to 'parse.c')
| -rw-r--r-- | parse.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |
