mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Support 'MACRO mac' as well as 'mac: MACRO' for defining macros
The new syntax is used in documentation, but the old syntax is not yet deprecated.
This commit is contained in:
15
test/asm/macro-syntax.asm
Normal file
15
test/asm/macro-syntax.asm
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
old: MACRO ; comment
|
||||
println "out with the ", \1
|
||||
ENDM ; comment
|
||||
|
||||
MACRO new ; comment
|
||||
println "in with the ", \1
|
||||
ENDM ; comment
|
||||
|
||||
old 1
|
||||
new 2
|
||||
|
||||
bad1: MACRO bad2 ; comment
|
||||
println "which?"
|
||||
ENDM ; comment
|
||||
5
test/asm/macro-syntax.err
Normal file
5
test/asm/macro-syntax.err
Normal file
@@ -0,0 +1,5 @@
|
||||
ERROR: macro-syntax.asm(13):
|
||||
syntax error, unexpected identifier, expecting newline
|
||||
ERROR: macro-syntax.asm(15):
|
||||
syntax error, unexpected ENDM
|
||||
error: Assembly aborted (2 errors)!
|
||||
3
test/asm/macro-syntax.out
Normal file
3
test/asm/macro-syntax.out
Normal file
@@ -0,0 +1,3 @@
|
||||
out with the $1
|
||||
in with the $2
|
||||
which?
|
||||
5
test/asm/macro-syntax.simple.err
Normal file
5
test/asm/macro-syntax.simple.err
Normal file
@@ -0,0 +1,5 @@
|
||||
ERROR: macro-syntax.asm(13):
|
||||
syntax error
|
||||
ERROR: macro-syntax.asm(15):
|
||||
syntax error
|
||||
error: Assembly aborted (2 errors)!
|
||||
Reference in New Issue
Block a user