fix parsing error on ;; on newline

This commit is contained in:
zawz 2021-05-25 11:55:02 +02:00
parent 6b8f7241bb
commit 9ddf23dd4b

View file

@ -1363,8 +1363,10 @@ std::pair<case_block*, parse_context> parse_case(parse_context ctx)
}
if(ctx[ctx.i-1] != ';')
{
parse_error("Unexpected token ';'", ctx);
parse_error(strf("Unexpected token '%c'", ctx[ctx.i-1]), ctx);
}
if(ctx[ctx.i] == ';')
ctx.i++;
ctx.i=skip_unread(ctx);
}