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

Compilation mode between "full" and "derive" #467

Closed
alexcrichton opened this issue Aug 3, 2018 · 2 comments
Closed

Compilation mode between "full" and "derive" #467

alexcrichton opened this issue Aug 3, 2018 · 2 comments

Comments

@alexcrichton
Copy link
Collaborator

I've often found that for proc_macro_attribute purposes you often need to parse the function signature, but nothing beyond that really needs to be parsed. Namely use cases like wasm-bindgen don't need a full expression parser and can get away with the body of a function being internally stored as TokenStream.

I'm curious if it would be possible to have an interemediate mode between "full" and "derive" which allows compiling syn a bit more quickly. Have others run across this sort of desire before?

@dtolnay
Copy link
Owner

dtolnay commented Aug 3, 2018

I would be on board with more fine-grained knobs over what you want to support parsing. Do you know of any other attribute macros that would want function signatures only?

@dtolnay
Copy link
Owner

dtolnay commented Feb 17, 2019

This is now handled by https://github.com/taiki-e/syn-mid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants