From 38445380d1e0428e738784e7990db3c1180d79a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 15 May 2022 18:44:33 +0200 Subject: [PATCH] :art: Improve gack not printing error --- src/parse/scan1.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/parse/scan1.c b/src/parse/scan1.c index d64c1f66..4f5faf19 100644 --- a/src/parse/scan1.c +++ b/src/parse/scan1.c @@ -684,8 +684,12 @@ ANN static m_bool _scan1_func_def(const Env env, const Func_Def fdef) { --env->scope->depth; env->func = former; if (global) env_pop(env, scope); - if (fdef->base->xid == insert_symbol("@gack") && !fake.weight) - ERR_B(fdef->base->pos, "`@gack` operator not printing anything"); + if (fdef->base->xid == insert_symbol("@gack") && !fake.weight) { + gwerr_basic(_("`@gack` operator does not print anything"), NULL, + _("use `<<<` `>>>` in the function"), env->name, fdef->base->pos, 0); + env->context->error = true; + return GW_ERROR; + } return ret; } -- 2.43.0