diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-11-23 15:57:44 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-11-23 15:57:44 -0500 |
| commit | 83a2bff4bb04b0189d17419baf8ca520992d5033 (patch) | |
| tree | 63c24b6419e0896d985cb0c9f30b742274e95833 /src/typecheck.c | |
| parent | 2a24b0a3fc3c4986572ae2c4ea0e8e387497a7f6 (diff) | |
Added Metadata section for files instead of _HELP and _USAGE
Diffstat (limited to 'src/typecheck.c')
| -rw-r--r-- | src/typecheck.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/typecheck.c b/src/typecheck.c index 98fbf6da..4e1f5554 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -1511,6 +1511,7 @@ type_t *get_type(env_t *env, ast_t *ast) { } case Unknown: code_err(ast, "I can't figure out the type of: ", ast_to_sexp_str(ast)); case ExplicitlyTyped: return Match(ast, ExplicitlyTyped)->type; + case Metadata: return Type(VoidType); } #ifdef __GNUC__ #pragma GCC diagnostic pop @@ -1529,7 +1530,8 @@ PUREFUNC bool is_discardable(env_t *env, ast_t *ast) { case StructDef: case EnumDef: case LangDef: - case Use: return true; + case Use: + case Metadata: return true; default: break; } type_t *t = get_type(env, ast); @@ -1686,7 +1688,8 @@ PUREFUNC bool is_constant(env_t *env, ast_t *ast) { default: return is_constant(env, binop.lhs) && is_constant(env, binop.rhs); } } - case Use: return true; + case Use: + case Metadata: return true; case FunctionCall: return false; case InlineCCode: return true; default: return false; |
