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

format macros #8

Open
nrc opened this Issue Mar 9, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@nrc
Copy link
Member

nrc commented Mar 9, 2015

This will be interesting...

@nrc

This comment has been minimized.

Copy link
Member Author

nrc commented Apr 29, 2015

The strategy here will be to get the text for the macro, replace every $foo in the body of the macro with a string of the same length, e.g., xfoo. Then re-parse it and format it and convert the xfoos back to $foos (obvs we need to check that there is no xfoo in the body before substituting).

We'll need to format the decl of the macro, and find the body, I suppose, using token trees.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment