From 9ddf23dd4b38355600491004a02e0b54c4873b26 Mon Sep 17 00:00:00 2001 From: zawz Date: Tue, 25 May 2021 11:55:02 +0200 Subject: [PATCH] fix parsing error on ;; on newline --- src/parse.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parse.cpp b/src/parse.cpp index 2306bab..0c7a0f6 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -1363,8 +1363,10 @@ std::pair 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); }