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

Add component macro and example #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

maan2003
Copy link
Collaborator

The component macro helps to wrap the function body inside Cx::begin_loc and Cx::end to avoid key collision.

@maan2003
Copy link
Collaborator Author

The name_of_cx function is very ugly but is simplest among the alternative I have tried out.

Copy link
Owner

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! I haven't reviewed the proc macro logic carefully, but certainly based on the example it looks like it's doing what it should be.

crochet-macros/Cargo.toml Show resolved Hide resolved
crochet-macros/Cargo.toml Show resolved Hide resolved
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.

2 participants