]> Nishi Git Mirror - gwion.git/commitdiff
:bug: FIx minify
authorfennecdjay <fennecdjay@gmail.com>
Sat, 21 Jan 2023 20:02:45 +0000 (21:02 +0100)
committerfennecdjay <fennecdjay@gmail.com>
Sat, 21 Jan 2023 20:02:45 +0000 (21:02 +0100)
fmt
include/gwi.h
src/import/import_internals.c
src/import/import_oper.c
src/import/import_special.c
src/import/import_type.c

diff --git a/fmt b/fmt
index c026b026ff0a93b1fe4790f0918e315ff045a9f6..91b3c4e658b095dc9784946bb2829e7bf5f28907 160000 (submodule)
--- a/fmt
+++ b/fmt
@@ -1 +1 @@
-Subproject commit c026b026ff0a93b1fe4790f0918e315ff045a9f6
+Subproject commit 91b3c4e658b095dc9784946bb2829e7bf5f28907
index 35383c818ce61af736d712dc1b2e205dee2fbb1a..95f45651c5b77f6331f8a72d860fb63d6b2588af 100644 (file)
@@ -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_ {
index 1542d41278abb4cad2cc57cf0ccd73e50c53a5b4..0346d8e6da4ffc7ccce4599553217beedeeb7331 100644 (file)
@@ -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);
index 68adceaaebabbd394e6e5f57013989fa2817b9b5..57bff00293a84d63cd963449cf2a22461032989a 100644 (file)
@@ -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);
index 971a29eec7c91965472ab2e56a822b26871eed4e..1927ac2a42ffd1b198d75b1145c109cb7102d98e 100644 (file)
@@ -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_));
index ed6fa92bb8268662e6277fdfa70cb67b75be6dd0..f2ddca06090d01a29dd92454445d5670101a79e5 100644 (file)
@@ -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);
   }