-
Notifications
You must be signed in to change notification settings - Fork 440
Update README.md #2212
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
Update README.md #2212
Conversation
@swift-ci Please test |
Examples/README.md
Outdated
@@ -5,6 +5,7 @@ Each example can be executed by navigating into this folder and running `swift r | |||
- [AddOneToIntegerLiterals](Sources/AddOneToIntegerLiterals/AddOneToIntegerLiterals.swift): Command line tool to add 1 to every integer literal in a source file | |||
- [CodeGenerationUsingSwiftSyntaxBuilder](Sources/CodeGenerationUsingSwiftSyntaxBuilder/CodeGenerationUsingSwiftSyntaxBuilder.swift): Code-generate a simple source file using SwiftSyntaxBuilder | |||
- [ExamplePlugin](Sources/ExamplePlugin): Compiler plugin executable using [`SwiftCompilerPlugin`](../Sources/SwiftCompilerPlugin) | |||
- [MacroExamples](Sources/MacroExampls): A collection of Swift macros |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💙
|
||
## Documentation | ||
|
||
You can read SwiftSyntax’s documentation on [swiftpackageindex.com](https://swiftpackageindex.com/apple/swift-syntax/documentation). | ||
|
||
A great way to interactively explore the SwiftSyntax tree of a source file is https://swift-ast-explorer.com, developed by [@kishikawakatsumi](https://github.com/kishikawakatsumi). | ||
|
||
## Adding SwiftSyntax as a Dependency | ||
A set of example usages of swift-syntax can be found in [Examples](Examples). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With Swift 5.9 out, lots of folks are looking to get their hands dirty with Swift macros.
How about we jazz up the README to spotlight our Macro examples? We could go with something like:
A set of example usages of swift-syntax can be found in [Examples](Examples). | |
A variety of example usages of swift-syntax are available in the [Examples](Examples) directory, including a collection of [Swift macros](Examples/Sources/MacroExampls). |
What do you think? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see the macro examples cleaned up a little bit before giving them a top-level highlight in the README.md first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any areas in mind that could be improved in the macro examples not mentioned in #2169?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I basically meant the first two open points in #2169
- Make implementations of all macros consistent
- Change nodes modification to use variable setters instead of
with
approach
And maybe adding some more comments that explain what’s being done, not sure how much of those would be needed.
3d3f879
to
5046cb4
Compare
README.md hasn’t really been re-visited in a while and contained a lot of outdated information. Shorten it a little bit.
5046cb4
to
dd02513
Compare
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
README.md hasn’t really been re-visited in a while and contained a lot of outdated information. Shorten it a little bit.