From: fennecdjay Date: Thu, 13 Jun 2019 20:20:53 +0000 (+0200) Subject: :art:Gcc like message X-Git-Tag: nightly~2442^2~4 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=190435b4a519fbe4eec47d75f3f18c9678fb6a42;p=gwion.git :art:Gcc like message --- diff --git a/ast b/ast index 63cdc302..ebe247e4 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit 63cdc302579f7e86ddeb6b498e1336b933499700 +Subproject commit ebe247e43e6e2cddb6fc46ad63843405b3006bcb diff --git a/src/gwion.c b/src/gwion.c index 9b0c185c..ba957def 100644 --- a/src/gwion.c +++ b/src/gwion.c @@ -106,14 +106,15 @@ ANN void gwion_end(const Gwion gwion) { } ANN void env_err(const Env env, const struct YYLTYPE* pos, const m_str fmt, ...) { - loc_err(pos, env->name); if(env->class_def) gw_err("in class: '%s'\n", env->class_def->name); if(env->func) gw_err("in function: '%s'\n", env->func->name); + loc_header(pos, env->name); va_list arg; va_start(arg, fmt); vfprintf(stderr, fmt, arg); va_end(arg); fprintf(stderr, "\n"); + loc_err(pos, env->name); }