Closed as not planned
Description
macro foo
println \1, " world!"
endm
foo "hello
macro bar
println \1 world!"
endm
bar "goodbye
error: main.asm(4):
Unterminated string
error: main.asm(4) -> main.asm::foo(2):
syntax error, unexpected identifier
error: main.asm(4) -> main.asm::foo(2):
Unterminated string
error: main.asm(9):
Unterminated string
goodbye world!
error: Assembly aborted (4 errors)!
I don't think that lexing macro arguments should be giving an "unterminated string" error. If/when the argument is expanded, its usage will still give an unterminated string error in context (e.g. when foo "hello
expands to println "hello, " world!"
) -- except for edge cases where the whole point is that it wouldn't (e.g. when bar "hello
expands to println "goodbye world!"
). For example, the above output would then be:
error: main.asm(4) -> main.asm::foo(2):
syntax error, unexpected identifier
error: main.asm(4) -> main.asm::foo(2):
Unterminated string
goodbye world!
error: Assembly aborted (2 errors)!