mirror of
https://github.com/janet-lang/janet
synced 2025-04-14 23:03:13 +00:00
Expose linting array to macros.
This has a lot of possible uses, and would let users add a macro-based type system on top of Janet that would integrate with the usual linting and warning system.
This commit is contained in:
parent
7ff204ec44
commit
33c000daea
@ -679,6 +679,9 @@ static int macroexpand1(
|
||||
Janet tempOut;
|
||||
JanetSignal status = janet_continue(fiberp, janet_wrap_nil(), &tempOut);
|
||||
janet_table_put(c->env, mf_kw, janet_wrap_nil());
|
||||
if (c->lints) {
|
||||
janet_table_put(c->env, janet_ckeywordv("macro-lints"), janet_wrap_array(c->lints));
|
||||
}
|
||||
janet_gcunlock(lock);
|
||||
if (status != JANET_SIGNAL_OK) {
|
||||
const uint8_t *es = janet_formatc("(macro) %V", tempOut);
|
||||
|
Loading…
x
Reference in New Issue
Block a user