When skipping a macro definintion because of an error, apply the same handling

regarding .endmacro as when the macro is parsed regularily: A .endmacro ends
the macro only if is the first token on a line.
This commit is contained in:
Kugel Fuhr
2025-07-06 11:38:27 +02:00
parent 7b79fd1ec1
commit 4a8498cb0a
5 changed files with 16 additions and 6 deletions

View File

@@ -1,3 +1,3 @@
.struct x
.word
.word
.endstruct

View File

@@ -1,2 +1,2 @@
lda |

View File

@@ -0,0 +1,6 @@
.macro mac
.define endmac .endmacro
.endmacro
.macro mac
.define endmac .endmacro
.endmacro

View File

@@ -0,0 +1,2 @@
142-errormsg.s:4: Error: A macro named 'mac' is already defined
142-errormsg.s:1: Note: Previous definition of macro 'mac' was here