Currently writing do foo!(...) { ... } (where foo!(...) expands to foo(...)) fails with an error "error: do must be followed by a block call".
This makes it impossible to write eDSLish macros that use blocks. Instead one must write foo!(..., { ... }) which looks much uglier.
It is also impossible to have foo!(...) expand to do foo(...) and then write foo!(...) { ... }. This is probably undesirable anyway.
At any rate - this restriction seems to be the result of a specific AST structure (wild guess here) rather than an intentional limitation. Is there a chance it can be lifted (to allow for better eDSL-ish notations)?
Currently writing
do foo!(...) { ... }
(wherefoo!(...)
expands tofoo(...)
) fails with an error "error:do
must be followed by a block call".This makes it impossible to write eDSLish macros that use blocks. Instead one must write
foo!(..., { ... })
which looks much uglier.It is also impossible to have
foo!(...)
expand todo foo(...)
and then writefoo!(...) { ... }
. This is probably undesirable anyway.At any rate - this restriction seems to be the result of a specific AST structure (wild guess here) rather than an intentional limitation. Is there a chance it can be lifted (to allow for better eDSL-ish notations)?