-
-
Notifications
You must be signed in to change notification settings - Fork 179
Closed as not planned
Labels
bugUnexpected behavior / crashes; to be fixed ASAP!Unexpected behavior / crashes; to be fixed ASAP!rgbasmThis affects RGBASMThis affects RGBASM
Description
macro foo
println \1, " world!"
endm
foo "hello
macro bar
println \1 world!"
endm
bar "goodbyeerror: 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)!Metadata
Metadata
Assignees
Labels
bugUnexpected behavior / crashes; to be fixed ASAP!Unexpected behavior / crashes; to be fixed ASAP!rgbasmThis affects RGBASMThis affects RGBASM