mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
@@ -163,7 +163,8 @@ static int32_t popcontext(void)
|
||||
}
|
||||
|
||||
yy_delete_buffer(CurrentFlexHandle);
|
||||
nLineNo = pLastFile->nLine;
|
||||
nLineNo = nCurrentStatus == STAT_isREPTBlock ? nCurrentREPTBodyLastLine
|
||||
: pLastFile->nLine;
|
||||
|
||||
if (nCurrentStatus == STAT_isInclude)
|
||||
fclose(pCurrentFile);
|
||||
@@ -190,8 +191,6 @@ static int32_t popcontext(void)
|
||||
nCurrentREPTBlockSize = pLastFile->nREPTBlockSize;
|
||||
nCurrentREPTBlockCount = pLastFile->nREPTBlockCount;
|
||||
nCurrentREPTBodyFirstLine = pLastFile->nREPTBodyFirstLine;
|
||||
/* + 1 to account for the `ENDR` line */
|
||||
nLineNo = pLastFile->nREPTBodyLastLine + 1;
|
||||
break;
|
||||
default:
|
||||
fatalerror("%s: Internal error.", __func__);
|
||||
|
||||
8
test/asm/rept-line-no.asm
Normal file
8
test/asm/rept-line-no.asm
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
WARN "Line 2"
|
||||
REPT 3
|
||||
|
||||
WARN "Line 5"
|
||||
|
||||
ENDR
|
||||
WARN "Line 8"
|
||||
10
test/asm/rept-line-no.out
Normal file
10
test/asm/rept-line-no.out
Normal file
@@ -0,0 +1,10 @@
|
||||
warning: rept-line-no.asm(2): [-Wuser]
|
||||
Line 2
|
||||
warning: rept-line-no.asm(3) -> rept-line-no.asm::REPT~1(5): [-Wuser]
|
||||
Line 5
|
||||
warning: rept-line-no.asm(3) -> rept-line-no.asm::REPT~2(5): [-Wuser]
|
||||
Line 5
|
||||
warning: rept-line-no.asm(3) -> rept-line-no.asm::REPT~3(5): [-Wuser]
|
||||
Line 5
|
||||
warning: rept-line-no.asm(8): [-Wuser]
|
||||
Line 8
|
||||
Reference in New Issue
Block a user