From 1000e3e7b070c31db012c05ce7c9edba9a7c32df Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 12 Feb 2024 14:21:31 +0100 Subject: [PATCH] :fire: poison scan1 (while) --- src/parse/scan1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parse/scan1.c b/src/parse/scan1.c index 45261db0..42a7c9ce 100644 --- a/src/parse/scan1.c +++ b/src/parse/scan1.c @@ -104,12 +104,13 @@ static inline bool scan1_defined(const Env env, const Var_Decl *var) { ANN bool abstract_array(const Env env, const Array_Sub array) { Exp* e = array->exp; + bool ok = true; while(e) { if(!exp_is_zero(e)) - ERR_B(e->loc, _("arrays of abstract type should use `0` size")); + ERR_OK(ok, e->loc, _("arrays of abstract type should use `0` size")); e = e->next; } - return true; + return ok; } ANN static bool scan1_decl(const Env env, Exp_Decl *const decl) { -- 2.43.0