Fix invalid character in bracketed macro argument

The invalid character should not be consumed by `shiftChar()`.
This commit is contained in:
Rangi42
2026-04-27 16:57:54 +02:00
parent c1c7e64249
commit 9fd0c0297f
7 changed files with 20 additions and 6 deletions
+3 -2
View File
@@ -3,5 +3,6 @@
)
(
)
illegal character escape z?
)
illegal character escape z?
invalid character
+1 -1
View File
@@ -1,2 +1,2 @@
all args: a,#b,c,1,#2,3
bad args: >, >
bad args: ?>, >
+6
View File
@@ -0,0 +1,6 @@
MACRO m
println "¿", """\<_NARG""", "?"
println """done!"""
ENDM
m one, two, three
+3
View File
@@ -0,0 +1,3 @@
error: Invalid character '"' in bracketed macro argument
at invalid-bracketed-macro-arg.asm::m(2) <- invalid-bracketed-macro-arg.asm(6)
Assembly aborted with 1 error
+2
View File
@@ -0,0 +1,2 @@
¿?
done!
+1 -1
View File
@@ -1,5 +1,5 @@
error: Invalid character '!' in bracketed macro argument
at invalid-macro-arg-character.asm(1)
error: syntax error, unexpected >
error: syntax error, unexpected !
at invalid-macro-arg-character.asm(1)
Assembly aborted with 2 errors