mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 19:22:05 +00:00
Allow trailing commas in bare lists
This applies to macro arguments, DB, DW, DL, DS, PRINT, PRINTLN, EXPORT, PURGE, and OPT. It also removes support for empty entries in DB/DW/DL. (Deprecating it would require keeping parser support, which is ambiguous with trailing commas.) Fixes #753
This commit is contained in:
25
test/asm/trailing-commas.asm
Normal file
25
test/asm/trailing-commas.asm
Normal file
@@ -0,0 +1,25 @@
|
||||
SECTION "test", ROM0
|
||||
|
||||
mac: MACRO
|
||||
println "\#"
|
||||
ENDM
|
||||
|
||||
mac 1,2, 3 , ,5,
|
||||
|
||||
db 1,2,3,
|
||||
dw 4,5,6,
|
||||
dl 7,8,9,
|
||||
ds 10, $a, $b, $c,
|
||||
|
||||
print "Hello", " ",
|
||||
println "world", "!",
|
||||
|
||||
spam:
|
||||
eggs:
|
||||
lobsterThermidor:
|
||||
|
||||
export spam, eggs,
|
||||
purge lobsterThermidor,
|
||||
|
||||
opt boO, g.xX#,
|
||||
dw %ooOOOOoo, `XX##..xx,
|
||||
Reference in New Issue
Block a user