diff options
| -rw-r--r-- | examples/vec.fwd | 2 | ||||
| -rw-r--r-- | src/parser.y | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/vec.fwd b/examples/vec.fwd index 6c854d5..f7838f1 100644 --- a/examples/vec.fwd +++ b/examples/vec.fwd @@ -67,7 +67,7 @@ append_vec(vec v, i64 e, (vec) ok) at_vec(vec v, u64 i, (vec, &i64) ok) { v => [n => n, s => s, buf => buf]; - if i >= n {fwdpanic("bounds error");} + guard(i < n) => {fwdpanic("bounds error")} => ; fwdptradd(buf, (i * sizeof(i64)) as i64) => *i64 buf; nil buf {fwdpanic("should never happen");} => &i64 bufr; ok([n => n, s => s, buf => buf] vec, bufr); diff --git a/src/parser.y b/src/parser.y index 9607e71..5f46895 100644 --- a/src/parser.y +++ b/src/parser.y @@ -395,7 +395,7 @@ closures } call - : expr "(" opt_exprs ")" ";" { + : expr "(" opt_exprs ")" { $$ = gen_call($1, $[opt_exprs], src_loc(@$)); } | expr "(" opt_exprs ")" "=>" opt_vars ";" { |
