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 some examples #13

Merged
merged 3 commits into from
Feb 9, 2024
Merged

Add some examples #13

merged 3 commits into from
Feb 9, 2024

Conversation

Mx-Iris
Copy link
Contributor

@Mx-Iris Mx-Iris commented Feb 6, 2024

Hey buddy, thanks to your framework for making it easier for me to write macro code, I've now added some macros I'm using as examples, and I've changed the version control tag exact to from to be compatible with newer versions of swift-syntax

@stackotter
Copy link
Owner

Thanks for the PR, I'm glad that you're finding the library useful! Changing the tag from exact to from is definitely a good idea now that Swift Syntax is stabilising.

In regards to the new example macros, I think these are great use-cases, however the macros are all very similar so they don't individually provide too much use as separate examples. I think the AddAsyncInterface and AddAsyncImplementation macros should be able to be merged into a single macro, and the AllMembers versions should be able to be merged into a single macro too. Happy to give more pointers on condensing the macros if needed!

@Mx-Iris
Copy link
Contributor Author

Mx-Iris commented Feb 8, 2024

@stackotter Yes, I just need to check whether the function definition contains the body to distinguish between interface and implementation. I have changed it according to what you said

Copy link
Owner

@stackotter stackotter left a comment

Choose a reason for hiding this comment

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

Awesome thanks! Love how simple the AllMembers version is now 👌

@stackotter stackotter merged commit 9d139f3 into stackotter:main Feb 9, 2024
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.

None yet

2 participants