diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-23 10:54:56 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-23 10:54:56 -0500 |
commit | 82d5bbc0bc0a99136fed9471868d5358c742128c (patch) | |
tree | ce84287d936bc3bca1d555750915301fb1d7db5e /lisc/parse.c | |
parent | b75c211dbfa47f5439ebd4b02e90e4db40b3f15a (diff) | |
download | roux-82d5bbc0bc0a99136fed9471868d5358c742128c.tar.gz |
patch return, might not work
Diffstat (limited to 'lisc/parse.c')
-rw-r--r-- | lisc/parse.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisc/parse.c b/lisc/parse.c index 1f2e557..51917a0 100644 --- a/lisc/parse.c +++ b/lisc/parse.c @@ -507,9 +507,10 @@ parseline(PState ps) case TRet: curb->jmp.type = (int[]){ JRetw, JRetl, + JRets, JRetd, JRetc, JRet0 }[rcls]; - if (rcls < 3) { + if (rcls < 5) { r = parseref(); if (req(r, R)) err("return value expected"); @@ -632,7 +633,7 @@ parsefn() if (peek() != TGlo) rcls = parsecls(&fn->retty); else - rcls = 3; + rcls = 5; if (next() != TGlo) err("function name expected"); strcpy(fn->name, tokval.str); |