From 54a7bd890d660b39b37a749fab333fa267943baf Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 21 Jan 2023 21:02:45 +0100 Subject: [PATCH] :bug: FIx minify --- fmt | 2 +- include/gwi.h | 6 +++--- src/import/import_internals.c | 2 +- src/import/import_oper.c | 12 ++++++------ src/import/import_special.c | 2 +- src/import/import_type.c | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/fmt b/fmt index c026b026..91b3c4e6 160000 --- a/fmt +++ b/fmt @@ -1 +1 @@ -Subproject commit c026b026ff0a93b1fe4790f0918e315ff045a9f6 +Subproject commit 91b3c4e658b095dc9784946bb2829e7bf5f28907 diff --git a/include/gwi.h b/include/gwi.h index 35383c81..95f45651 100644 --- a/include/gwi.h +++ b/include/gwi.h @@ -6,18 +6,18 @@ if (a->gwion->data->cdoc) do { \ lint_nl(gwi->lint); \ lint_indent(gwi->lint); \ - lint(gwi->lint, (m_str)"{-}#!+ {/}%s{0}\n", __VA_ARGS__); \ + lint_util(gwi->lint, (m_str)"{-}#!+ {/}%s{0}\n", __VA_ARGS__); \ } while (0) #define gwidoc(a, ...) \ if (a->gwion->data->cdoc) do { \ lint_nl(a->lint); \ lint_indent(a->lint); \ - lint(a->lint, (m_str)"{-}#!- {/}%s{0}\n", __VA_ARGS__); \ + lint_util(a->lint, (m_str)"{-}#!- {/}%s{0}\n", __VA_ARGS__); \ } while (0) #define gwinote(a, ...) \ if (a->gwion->data->cdoc) do { \ lint_indent(a->lint); \ - lint(a->lint, (m_str)"{-}#!- {/}%s{0}\n", __VA_ARGS__); \ + lint_util(a->lint, (m_str)"{-}#!- {/}%s{0}\n", __VA_ARGS__); \ } while (0) struct Gwi_ { diff --git a/src/import/import_internals.c b/src/import/import_internals.c index 1542d412..0346d8e6 100644 --- a/src/import/import_internals.c +++ b/src/import/import_internals.c @@ -34,7 +34,7 @@ ANN static m_bool run_with_doc(const Gwi gwi, m_bool (*f)(const Gwi)) { text_init(&ls.text, gwi->gwion->mp); Lint linter = {.mp = gwi->gwion->mp, .ls = &ls }; lint_indent(&linter); - lint(&linter, "{-}#!+ %s{0}\n", gwi->gwion->env->name); + lint_util(&linter, "{-}#!+ %s{0}\n", gwi->gwion->env->name); gwi->lint = &linter; const m_bool ret = f(gwi); fprintf(stdout, "%s", ls.text.str); diff --git a/src/import/import_oper.c b/src/import/import_oper.c index 68adceaa..57bff002 100644 --- a/src/import/import_oper.c +++ b/src/import/import_oper.c @@ -74,28 +74,28 @@ ANN void gwi_oper_eff(const Gwi gwi, const m_str effect) { ANN m_int gwi_oper_end(const Gwi gwi, const m_str op, const f_instr f) { if (gwi->gwion->data->cdoc) { lint_indent(gwi->lint); - lint(gwi->lint, "{+C}operator{0} "); + lint_util(gwi->lint, "{+C}operator{0} "); if (gwi->oper->lhs && !gwi->oper->rhs) { - lint(gwi->lint, "{+}%s{0}", + lint_util(gwi->lint, "{+}%s{0}", gwi->oper->lhs != (m_str)1 ? gwi->oper->lhs : "@Any"); lint_space(gwi->lint); } if (gwi->oper->ret) { - lint(gwi->lint, "{+}%s{0}", + lint_util(gwi->lint, "{+}%s{0}", gwi->oper->ret != (m_str)1 ? gwi->oper->ret : "@Any"); lint_space(gwi->lint); } - lint(gwi->lint, "{/}%s{0}", op); + lint_util(gwi->lint, "{/}%s{0}", op); lint_space(gwi->lint); lint_lparen(gwi->lint); if (gwi->oper->lhs && gwi->oper->rhs) { - lint(gwi->lint, "{+}%s{0}", + lint_util(gwi->lint, "{+}%s{0}", gwi->oper->lhs != (m_str)1 ? gwi->oper->lhs : "@Any"); lint_comma(gwi->lint); lint_space(gwi->lint); } if (gwi->oper->rhs) - lint(gwi->lint, "{+}%s{0}", + lint_util(gwi->lint, "{+}%s{0}", gwi->oper->rhs != (m_str)1 ? gwi->oper->rhs : "@Any"); lint_rparen(gwi->lint); lint_sc(gwi->lint); diff --git a/src/import/import_special.c b/src/import/import_special.c index 971a29ee..1927ac2a 100644 --- a/src/import/import_special.c +++ b/src/import/import_special.c @@ -29,7 +29,7 @@ ANN void gwi_register_pass(const Gwi gwi, const m_str name, ANN void gwi_specialid(const Gwi gwi, const m_str id, const SpecialId spid) { if (gwi->gwion->data->cdoc) - lint(gwi->lint, "{+C}specialid{0} %s{/}%s{0};\n", + lint_util(gwi->lint, "{+C}specialid{0} %s{/}%s{0};\n", spid->is_const ? "{+G}const{0} " : "", id); struct SpecialId_ *a = mp_calloc(gwi->gwion->mp, SpecialId); memcpy(a, spid, sizeof(struct SpecialId_)); diff --git a/src/import/import_type.c b/src/import/import_type.c index ed6fa92b..f2ddca06 100644 --- a/src/import/import_type.c +++ b/src/import/import_type.c @@ -33,8 +33,8 @@ Type gwi_mk_type(const Gwi gwi, const m_str name, const m_uint size, const m_str parent_name) { if (gwi->gwion->data->cdoc) { lint_indent(gwi->lint); - lint(gwi->lint, "{+C}primitive{0} {+}%s{0}", name); - if (parent_name) lint(gwi->lint, " {+C}extends{0} {+}%s{0}", parent_name); + lint_util(gwi->lint, "{+C}primitive{0} {+}%s{0}", name); + if (parent_name) lint_util(gwi->lint, " {+C}extends{0} {+}%s{0}", parent_name); lint_sc(gwi->lint); lint_nl(gwi->lint); } -- 2.43.0