diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-24 16:36:27 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-24 16:36:27 -0500 |
| commit | d4b10514fbe3afc7229efe74b015a664b52eba33 (patch) | |
| tree | 133cf2fd377ab8acbfa65908d04473ce0dd0ca49 /typecheck.c | |
| parent | 1e3fb8a2c0cca385d65c52679411b118b5fb4641 (diff) | |
Clean up some more null->none renames and fix the documentation. Also
change the literal syntax to `NONE:T` instead of `!T`
Diffstat (limited to 'typecheck.c')
| -rw-r--r-- | typecheck.c | 8 |
1 files changed, 4 insertions, 4 deletions
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)); |
