commit eb78fdb2b036f871216ba8f09748f3331a972259
parent 11b7c1155aefc83910804d1459516cf47c298eb7
Author: m21c <ho*******@gmail.com>
Date: Sat, 2 Oct 2021 14:22:44 +0200
tweaked behaviour of ';' at beginning of a line
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/compiler.c b/compiler.c
@@ -1878,8 +1878,11 @@ checkend(Source *source, bool hastail, int needindent,
{
if (getkind(source) == '\n') {
gettok(source);
- if (getkind(source) == ';')
+ if (getkind(source) == ';') {
error(getloc(source), expecterrmsg);
+ gettok(source);
+ return true;
+ }
}
if (source->lastkind == '\n' && source->lastindent < needindent)