Closed jwerle closed 4 years ago
that's intentional for macro hygiene. However, it also makes macros less useful.
My intention is actually to replace macros with something similar to what rust does: full AST manipulation. i.e. a macro should take an AST and return an AST, which would absolutely allow constructing a string like that.
Yeah that makes sense. That sounds great about the macro improvement. I am looking forward to it!
@jwerle have a look at
https://github.com/aep/zz/pull/41/files#diff-37d3d2e9ec9ee1d59e668dda9af632b3
macros are now arbitrary zz code that gets executed on the host. it can in turn return arbitrary zz code on stdout, which is evaluated in the context of the macro invocation
Hello @aep,
What are your thoughts on not inserting a semicolon at the end of a
macro
evaluation?For example:
results in a compile error because a semicolon is inserted at the end of
"hello"