mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-08 10:59:36 +00:00
Add test case for local labels after block-ending keywords
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
section "test", ROM0
|
||||||
|
Global:
|
||||||
|
|
||||||
|
if 0
|
||||||
|
println "no"
|
||||||
|
endc.local_no
|
||||||
|
if 1
|
||||||
|
println "yes"
|
||||||
|
endc.local_yes
|
||||||
|
|
||||||
|
rept 0
|
||||||
|
println "nope"
|
||||||
|
endr.local_nope
|
||||||
|
rept 1
|
||||||
|
println "yep"
|
||||||
|
endr.local_yep
|
||||||
|
|
||||||
|
macro mac
|
||||||
|
println "mac"
|
||||||
|
endm.local_mac
|
||||||
|
mac
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
error: syntax error, unexpected local label, expecting end of line or end of buffer or end of fragment literal
|
||||||
|
at local-after-end.asm(6)
|
||||||
|
error: Identifier "endc.local_yes" begins with a keyword; did you mean to put a space between them?
|
||||||
|
at local-after-end.asm(9)
|
||||||
|
error: syntax error, unexpected local label, expecting end of line or end of buffer or end of fragment literal
|
||||||
|
at local-after-end.asm(13)
|
||||||
|
error: syntax error, unexpected local label, expecting end of line or end of buffer or end of fragment literal
|
||||||
|
at local-after-end.asm(16)
|
||||||
|
error: syntax error, unexpected local label, expecting end of line or end of buffer or end of fragment literal
|
||||||
|
at local-after-end.asm(20)
|
||||||
|
error: Undefined macro `mac`
|
||||||
|
at local-after-end.asm(21)
|
||||||
|
FATAL: Ended block with 2 unterminated conditionals (`IF`/`ELIF`/`ELSE` blocks)
|
||||||
|
at local-after-end.asm(22)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
yes
|
||||||
Reference in New Issue
Block a user