From 190435b4a519fbe4eec47d75f3f18c9678fb6a42 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 13 Jun 2019 22:20:53 +0200 Subject: [PATCH] :art:Gcc like message --- ast | 2 +- src/gwion.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.43.0