-Subproject commit c026b026ff0a93b1fe4790f0918e315ff045a9f6
+Subproject commit 91b3c4e658b095dc9784946bb2829e7bf5f28907
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_ {
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);
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);
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_));
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);
}