From d4b10514fbe3afc7229efe74b015a664b52eba33 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 24 Nov 2024 16:36:27 -0500 Subject: Clean up some more null->none renames and fix the documentation. Also change the literal syntax to `NONE:T` instead of `!T` --- typecheck.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'typecheck.c') diff --git a/typecheck.c b/typecheck.c index da810258..8bb5dc48 100644 --- a/typecheck.c +++ b/typecheck.c @@ -505,10 +505,10 @@ type_t *get_type(env_t *env, ast_t *ast) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wswitch-default" switch (ast->tag) { - case Null: { - if (!Match(ast, Null)->type) + case None: { + if (!Match(ast, None)->type) return Type(OptionalType, .type=NULL); - type_t *t = parse_type_ast(env, Match(ast, Null)->type); + type_t *t = parse_type_ast(env, Match(ast, None)->type); return Type(OptionalType, .type=t); } case Bool: { @@ -1310,7 +1310,7 @@ type_t *parse_type_string(env_t *env, const char *str) PUREFUNC bool is_constant(env_t *env, ast_t *ast) { switch (ast->tag) { - case Bool: case Num: case Null: return true; + case Bool: case Num: case None: return true; case Int: { auto info = Match(ast, Int); Int_t int_val = Int$parse(Text$from_str(info->str)); -- cgit v1.2.3