commit c71d8831b23364926de62eb53dfca4b1c18edee9 parent ae88ac6c0e6e3cb53632adba98e2e79da1bd7378 Author: Nihal Jere <nihal@nihaljere.xyz> Date: Tue, 14 Dec 2021 16:50:29 -0600 only exit blockloop on RCURLY if opened with LCURLY Diffstat:
M | parse.c | | | 2 | +- |
A | test/curly.fail.nooc | | | 3 | +++ |
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/parse.c b/parse.c @@ -287,7 +287,7 @@ parseblock() tok = tok->next; } - while (tok->type != TOK_NONE && tok->type != TOK_RCURLY) { + while (!(tok->type == TOK_NONE || (curlies && tok->type == TOK_RCURLY))) { item = (struct item){ 0 }; item.start = tok; if (tok->type == TOK_LET) { diff --git a/test/curly.fail.nooc b/test/curly.fail.nooc @@ -0,0 +1,3 @@ +let main proc = proc { +} +}}}}}}}}}}}}}}}}}}}}}}}}}}