Skip to content

Feature unsynn quote #759

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

cehteh
Copy link

@cehteh cehteh commented Jun 6, 2025

Yo Amos!

I see you like quote!, so I removed quote from facet and put quote in unsynn, now you can quote without depending or quote! (also the proc_macro2 dependency is gone)

Short story, long:
This is WIP/anticipatory of a not yet released unsynn 0.2 which will include its own quote! macro. for $reasons it will be slightly different (simpler) to the quote crate. there are no #() repetitions yet. But this can be easily handled see the patch.

Initially i was thinking i could just impl quote::ToTokens for dyn unsynn::ToTokens .. but unfortunally this didnt worked out, either because the quote::quote!() macro can't handle that or because the trait solver isn't smart enough. Anyway, i just got my "Hold my beer" moment yesterday: How complicated can a quote!{} in unsynn be? .. turns out its pretty trivial to do the basics. So unsynn has its own lean quote!{} macro now.

This is yet just a Draft PR (don't merge!) up for comment. For now I only touched facet-macros-parse I'll see to remove proc_macro2 deps (its reexported from unsynn) and quote from the rest of facet while going over it. Its a nice test case to me to see where unsynn lacks features.

cehteh added 2 commits June 6, 2025 19:11
unsynn re-exports the proc_macro2 entities. This was done to eleminate the need of an
additionaly dependency which version may become out of sync with the one unsynn uses.
unsynn 0.2 will include its own simple quote!{} macro
@cehteh cehteh force-pushed the feature-unsynn-quote branch from a5628b7 to b56ea69 Compare June 7, 2025 00:05
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

Successfully merging this pull request may close these issues.

1 participant