Skip to content
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

non-recursive macroexpand #19365

Closed
tpapp opened this issue Nov 19, 2016 · 1 comment
Closed

non-recursive macroexpand #19365

tpapp opened this issue Nov 19, 2016 · 1 comment
Labels
compiler:lowering Syntax lowering (compiler front end, 2nd stage)

Comments

@tpapp
Copy link
Contributor

tpapp commented Nov 19, 2016

Currently

macro foo(args...)
    args2 = do_something(args)
    quote
        @bar($(args2...))
    end
end
macroexpand(:(@foo arg1 arg2))

expands all the macros in the expression recursively.

This makes debugging difficult if the expansion of the inner macro is a complicated expression.

It would be nice to have an alternative, possibly either called macroexpand1, or macroexpand(expr, recursive=false), that would only expand the first level, similarly to COMMON-LISP:MACROEXPAND-1.

@ihnorton ihnorton added the compiler:lowering Syntax lowering (compiler front end, 2nd stage) label Nov 20, 2016
@jw3126 jw3126 mentioned this issue May 1, 2017
@KristofferC
Copy link
Member

Closed by #21662

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:lowering Syntax lowering (compiler front end, 2nd stage)
Projects
None yet
Development

No branches or pull requests

3 participants