-
Notifications
You must be signed in to change notification settings - Fork 440
Use SwiftSyntaxBuilder to generate SwiftSyntaxBuilder Tokens #381
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
Use SwiftSyntaxBuilder to generate SwiftSyntaxBuilder Tokens #381
Conversation
9be07b7
to
c7c3a28
Compare
Sources/SwiftSyntaxBuilderGeneration/SwiftSyntaxBuilderGeneration.swift
Outdated
Show resolved
Hide resolved
We also need to be able to run the executable from the CI, so we can ensure everything are up to date. |
1ca8240
to
64cfaa1
Compare
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.
Thanks. This is looking great! It’s good to see that we can actually generate that sort of semi-complex code using SwiftSyntaxBuilder. I’ve added some initial review comments inline.
@iMostfa is working on some nice API to add comments to syntax nodes here: #385, maybe that will also help with the generation of Tokens.swift
.
I think the next steps would be
- Integrate it into
build-script.py
(in this PR)- Add a
build-script.py
action to build + runSwiftSyntaxBuilderGeneration
(similar to the degyb action that currently exists) - Add a mode that verifies that the generated files match the committed ones for CI (
--verify-generated-files
)
- Add a
- In follow-up PRs:
- Fix the indentation issue (could also be a PR that we merge prior to this one)
- Use
SwiftSyntaxBuilderGeneration.swift
as an example to see how we can improve the SwiftSyntaxBuilder API, mostly by providing convenience initializers. - Adopt @iMostfa’s comment API
Sources/SwiftSyntaxBuilderGeneration/SwiftSyntaxBuilderGeneration.swift
Outdated
Show resolved
Hide resolved
9fdc9fe
to
0352492
Compare
417e9df
to
5495b08
Compare
e9e6839
to
ecbf68b
Compare
@swift-ci please test |
0e32efe
to
8be214e
Compare
@swift-ci please test |
8be214e
to
b08e4de
Compare
@swift-ci please test |
Sources/SwiftSyntaxBuilder/MemberAccessExprConvenienceInitializers.swift
Outdated
Show resolved
Hide resolved
23ed086
to
3c9e1f2
Compare
ffe145e
to
d7b67c4
Compare
7ec1c7b
to
80e30d3
Compare
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.
Let’s 🚢 it
@swift-ci Please test |
Looks like the generated files don’t match. Could you re-generate them? |
80e30d3
to
422bd62
Compare
@swift-ci please test |
1 similar comment
@swift-ci please test |
No description provided.