-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What to do about "do
macrocalls"
#319
Comments
Desirable features of an alternative AST:
With these in mind, could we change the
To satisfy point (3) we could even consider changing the representation of normal function calls with
But. A tricky point about this idea is that swapping the |
Or maybe we should have
It turns out that this is very natural in the parser because This AST is also pretty natural for macros to process, I think. And it's very naturally source-ordered in a similar way to the way that we order The downside is that checking for the presence of |
"
do
macrocalls" have an expression representation which is the same asdo
function calls. But the macrocall in this case acts not only on the its children, but on the body of thedo
block.It seems pretty weird for a macro expansion to act outside its child list in the expression tree, and this is the only such case.
Currently we have the following representation
Is there a neat alternative AST we could use to fix this special case?
The text was updated successfully, but these errors were encountered: