From bee62076c6cd8d54997a50061f8bd1ce082159d8 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sat, 20 Feb 2021 00:51:33 +0100 Subject: [PATCH] Allow ENDC at EOF without a newline --- src/asm/parser.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asm/parser.y b/src/asm/parser.y index 287b0e3e..e2a96021 100644 --- a/src/asm/parser.y +++ b/src/asm/parser.y @@ -651,7 +651,6 @@ line_directive : macrodef /* It's important that all of these require being at line start for `skipIfBlock` */ | elif | else - | endc ; if : T_POP_IF const T_NEWLINE { @@ -685,7 +684,7 @@ else : T_POP_ELSE T_NEWLINE { } ; -endc : T_POP_ENDC T_NEWLINE { +endc : T_POP_ENDC { if (fstk_GetIFDepth() == 0) fatalerror("Found ENDC outside an IF construct\n"); @@ -750,6 +749,7 @@ assignment_directive : equ ; directive : include + | endc | print | println | printf