mirror of
https://github.com/cc65/cc65.git
synced 2024-06-26 20:29:34 +00:00
Fix .endmacro not at the start of the line. Fix last commit
This commit is contained in:
parent
1c60bc5009
commit
0b71d1cfff
6
test/asm/err/bug2013.s
Normal file
6
test/asm/err/bug2013.s
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
; for PR #2013
|
||||||
|
; should produce error output:
|
||||||
|
; ... Error: '.ENDMACRO' expected for macro 'test'
|
||||||
|
|
||||||
|
.macro test
|
||||||
|
nop .endmacro
|
30
test/asm/val/bug2013.s
Normal file
30
test/asm/val/bug2013.s
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
; for PR #2013
|
||||||
|
.import _exit
|
||||||
|
.export _main
|
||||||
|
|
||||||
|
; this macro is invalid, but should not cause an error (if it is never expanded)
|
||||||
|
.macro invalid
|
||||||
|
nop .endmacro
|
||||||
|
.endmacro
|
||||||
|
|
||||||
|
.define temp_endmac .endmacro
|
||||||
|
.macro new_mac
|
||||||
|
.define startmac .macro
|
||||||
|
.define endmac .endmacro
|
||||||
|
temp_endmac
|
||||||
|
|
||||||
|
.undefine temp_endmac
|
||||||
|
|
||||||
|
new_mac
|
||||||
|
|
||||||
|
startmac dex2
|
||||||
|
dex
|
||||||
|
dex
|
||||||
|
endmac
|
||||||
|
|
||||||
|
_main:
|
||||||
|
ldx #$02
|
||||||
|
dex2
|
||||||
|
; x should be zero
|
||||||
|
txa
|
||||||
|
jmp _exit
|
Loading…
Reference in New Issue
Block a user