From: fennecdjay Date: Mon, 12 Feb 2024 23:50:00 +0000 (+0100) Subject: :fire: handle multiple passes, even better X-Git-Tag: nightly~91 X-Git-Url: http://10.11.0.4:5575/?a=commitdiff_plain;h=25417e964048b18ed7f295b81ab9743c057b0814;p=gwion.git :fire: handle multiple passes, even better --- diff --git a/src/pass.c b/src/pass.c index fdde35a5..1fb31961 100644 --- a/src/pass.c +++ b/src/pass.c @@ -12,15 +12,14 @@ #define N_SCANPASS 4 static m_bool typecheck_ast(const Env env, Ast *ast) { - env->scope->poison = false; // move me - scan0_ast(env, ast); - if(env->scope->poison)env->context->error = true; - scan1_ast(env, ast); - if(env->scope->poison)env->context->error = true; - scan2_ast(env, ast); - if(env->scope->poison)env->context->error = true; - CHECK_b(check_ast(env, ast)); - if(env->scope->poison)env->context->error = true; + if(!scan0_ast(env, ast)) + env->context->error = true; + if(!scan1_ast(env, ast)) + env->context->error = true; + if(!scan2_ast(env, ast)) + env->context->error = true; + if(!check_ast(env, ast)) + env->context->error = true; // CHECK_b(traverse_ast(env, ast)); // if(env->scope->poison)env->context->error = true; if(env->context->error)return GW_ERROR;