aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-03-09 23:21:44 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-03-09 23:21:44 -0500
commitfcd1381e3d619b39d0830fc6019078a9282325b3 (patch)
tree9b5070435fa53121c804d0b162653285ce20e7eb /compile.c
parentbeb929484b32eda79d0cc3f272120f1c852af296 (diff)
Minor cleanups to get compilation working on clang
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 0db9c07a..a395a75c 100644
--- a/compile.c
+++ b/compile.c
@@ -1454,10 +1454,11 @@ void compile_namespace(env_t *env, const char *ns_name, ast_t *block)
for (ast_list_t *stmt = block ? Match(block, Block)->statements : NULL; stmt; stmt = stmt->next) {
ast_t *ast = stmt->ast;
switch (ast->tag) {
- case FunctionDef:
+ case FunctionDef: {
CORD code = compile_statement(ns_env, ast);
env->code->funcs = CORD_cat(env->code->funcs, code);
break;
+ }
case Declare: {
auto decl = Match(ast, Declare);
type_t *t = get_type(ns_env, decl->value);