mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +00:00
Def and var evaluate to useful values.
This commit is contained in:
parent
7b9aedc53b
commit
16ac7ba1a1
@ -195,9 +195,8 @@ static JanetSlot janetc_var(JanetFopts opts, int32_t argn, const Janet *argv) {
|
||||
JanetSlot ret = dohead(c, opts, &head, argn, argv);
|
||||
if (c->result.status == JANET_COMPILE_ERROR)
|
||||
return janetc_cslot(janet_wrap_nil());
|
||||
if (destructure(c, argv[0], ret, varleaf, handleattr(c, argn, argv)))
|
||||
janetc_freeslot(c, ret);
|
||||
return janetc_cslot(janet_wrap_nil());
|
||||
destructure(c, argv[0], ret, varleaf, handleattr(c, argn, argv));
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int defleaf(
|
||||
@ -229,9 +228,8 @@ static JanetSlot janetc_def(JanetFopts opts, int32_t argn, const Janet *argv) {
|
||||
JanetSlot ret = dohead(c, opts, &head, argn, argv);
|
||||
if (c->result.status == JANET_COMPILE_ERROR)
|
||||
return janetc_cslot(janet_wrap_nil());
|
||||
if (destructure(c, argv[0], ret, defleaf, handleattr(c, argn, argv)))
|
||||
janetc_freeslot(c, ret);
|
||||
return janetc_cslot(janet_wrap_nil());
|
||||
destructure(c, argv[0], ret, defleaf, handleattr(c, argn, argv));
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user