1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-31 15:43:01 +00:00

Add -w and -x flags to janet for linting.

This commit is contained in:
Calvin Rose
2021-05-31 14:36:25 -05:00
parent bbae43f259
commit 4b96b73858
4 changed files with 55 additions and 22 deletions

View File

@@ -410,7 +410,9 @@ static JanetSlot janetc_if(JanetFopts opts, int32_t argn, const Janet *argv) {
right = janetc_value(bodyopts, truebody);
if (!drop && !tail) janetc_copy(c, target, right);
janetc_popscope(c);
janetc_throwaway(bodyopts, falsebody);
if (!janet_checktype(falsebody, JANET_NIL)) {
janetc_throwaway(bodyopts, falsebody);
}
janetc_popscope(c);
return target;
}