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

Update README.md #2212

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Update README.md #2212

merged 1 commit into from
Sep 19, 2023

Conversation

ahoppen
Copy link
Contributor

@ahoppen ahoppen commented Sep 18, 2023

README.md hasn’t really been re-visited in a while and contained a lot of outdated information. Shorten it a little bit.

@ahoppen ahoppen marked this pull request as ready for review September 18, 2023 18:37
@ahoppen
Copy link
Contributor Author

ahoppen commented Sep 18, 2023

@swift-ci Please test

@@ -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
Copy link
Contributor

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).
Copy link
Contributor

@Matejkob Matejkob Sep 18, 2023

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:

Suggested change
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? 🤔

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

I got you

Copy link
Contributor

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?

Copy link
Contributor Author

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.

README.md Show resolved Hide resolved
README.md hasn’t really been re-visited in a while and contained a lot of outdated information. Shorten it a little bit.
@ahoppen
Copy link
Contributor Author

ahoppen commented Sep 18, 2023

@swift-ci Please test

1 similar comment
@ahoppen
Copy link
Contributor Author

ahoppen commented Sep 19, 2023

@swift-ci Please test

@ahoppen ahoppen merged commit ad30a7b into swiftlang:main Sep 19, 2023
3 checks passed
@ahoppen ahoppen deleted the ahoppen/update-readme branch September 19, 2023 21:40
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

4 participants