mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Allow ENDC at EOF without a newline
This commit is contained in:
@@ -651,7 +651,6 @@ line_directive : macrodef
|
|||||||
/* It's important that all of these require being at line start for `skipIfBlock` */
|
/* It's important that all of these require being at line start for `skipIfBlock` */
|
||||||
| elif
|
| elif
|
||||||
| else
|
| else
|
||||||
| endc
|
|
||||||
;
|
;
|
||||||
|
|
||||||
if : T_POP_IF const T_NEWLINE {
|
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)
|
if (fstk_GetIFDepth() == 0)
|
||||||
fatalerror("Found ENDC outside an IF construct\n");
|
fatalerror("Found ENDC outside an IF construct\n");
|
||||||
|
|
||||||
@@ -750,6 +749,7 @@ assignment_directive : equ
|
|||||||
;
|
;
|
||||||
|
|
||||||
directive : include
|
directive : include
|
||||||
|
| endc
|
||||||
| print
|
| print
|
||||||
| println
|
| println
|
||||||
| printf
|
| printf
|
||||||
|
|||||||
Reference in New Issue
Block a user