From 83a2bff4bb04b0189d17419baf8ca520992d5033 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 23 Nov 2025 15:57:44 -0500 Subject: Added Metadata section for files instead of _HELP and _USAGE --- src/typecheck.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/typecheck.c') 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; -- cgit v1.2.3