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

Add tran keyword to allow for continuations.

This commit is contained in:
Calvin Rose
2017-05-09 19:21:30 -04:00
parent 0e29b52d96
commit fd72219a2a
10 changed files with 99 additions and 67 deletions

View File

@@ -553,6 +553,8 @@ static int gst_stl_parser_consume(Gst *vm) {
GstParser *p = gst_check_userdata(vm, 0, &gst_stl_parsetype);
if (p == NULL)
gst_c_throwc(vm, "expected parser");
if (p->status == GST_PARSER_ERROR)
gst_c_return(vm, gst_string_cv(vm, p->error));
if (!gst_parse_hasvalue(p))
gst_c_throwc(vm, "parser has no pending value");
gst_c_return(vm, gst_parse_consume(p));