ref: bee62076c6cd8d54997a50061f8bd1ce082159d8
parent: cd072d5e6a9031ae326e9d95c7680bde94a88d81
author: ISSOtm <[email protected]>
date: Fri Feb 19 19:51:33 EST 2021
Allow ENDC at EOF without a newline
--- a/src/asm/parser.y
+++ b/src/asm/parser.y
@@ -651,7 +651,6 @@
/* 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 @@
}
;
-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 @@
;
directive : include
+ | endc
| println
| printf