mirror of
https://github.com/janet-lang/janet
synced 2025-01-13 09:00:26 +00:00
Get tests passing again by returning keyword rather than nil from chunks
This commit is contained in:
parent
f0572c4d5f
commit
3c8930b72b
@ -2017,7 +2017,8 @@
|
|||||||
(while going
|
(while going
|
||||||
(if (env :exit) (break))
|
(if (env :exit) (break))
|
||||||
(buffer/clear buf)
|
(buffer/clear buf)
|
||||||
(if (nil? (chunks buf p))
|
(if (= (chunks buf p)
|
||||||
|
:cancel)
|
||||||
(do
|
(do
|
||||||
# Nil chunks represents a cancelled form in the REPL, so reset.
|
# Nil chunks represents a cancelled form in the REPL, so reset.
|
||||||
(parser/flush p)
|
(parser/flush p)
|
||||||
|
@ -63,7 +63,8 @@ Janet janet_line_getter(int32_t argc, Janet *argv) {
|
|||||||
gbl_cancel_current_repl_form = false;
|
gbl_cancel_current_repl_form = false;
|
||||||
|
|
||||||
// Signal that the user bailed out of the current form
|
// Signal that the user bailed out of the current form
|
||||||
result = janet_wrap_nil();
|
const static char *const msg = "cancel";
|
||||||
|
result = janet_ckeywordv(msg);
|
||||||
} else {
|
} else {
|
||||||
result = janet_wrap_buffer(buf);
|
result = janet_wrap_buffer(buf);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user