Hello,
I'm trying to write some procedural macros that take as input some asm z80 code.
I've been able to write such macro if I provide the z80 code in a string.
For example:
let listing = parse_assembly!(" ld a, 0
ld a, 0");
However, I have difficulties if I provide the z80 code as it is directly within the macro:
parse_assembly!( ld a, 0
ld a, 0 );
In this case, I am able to transform these tokens in a string (with TokenStream::to_string()
) in order to make my treatments on it. However, this is not the expected string. What I obtain is:
ld a, 0 ld a, 0
The line return has disappeared. Sadly it is important for my z80 parser to keep this line return.
I do not really know where to look at in order to properly generate the right string with the line return.
Is there anybody able to guide me there ?
Thanks