-
Notifications
You must be signed in to change notification settings - Fork 441
Move TypeAttribute
to SwiftSyntaxBuilder
#942
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
Move TypeAttribute
to SwiftSyntaxBuilder
#942
Conversation
51ae7d0
to
e66f6b5
Compare
0164cbe
to
920a2f6
Compare
cdbf1ed
to
a7ffa43
Compare
@swift-ci please test |
bcc9d23
to
85dd957
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 a lot for the continued de-gybification of SwiftSyntax. Overall looks good to me. I’ve got a few comments inline.
CodeGeneration/Sources/generate-swiftparser/SyntaxUtilities.swift
Outdated
Show resolved
Hide resolved
CodeGeneration/Sources/generate-swiftparser/templates/DeclarationAttributeFile.swift
Outdated
Show resolved
Hide resolved
CodeGeneration/Sources/generate-swiftparser/templates/DeclarationAttributeFile.swift
Outdated
Show resolved
Hide resolved
CodeGeneration/Sources/generate-swiftparser/templates/TypeAttributeFile.swift
Outdated
Show resolved
Hide resolved
db08b01
to
ba9ad40
Compare
2a66e65
to
72bc211
Compare
@swift-ci please test |
72bc211
to
883d1ca
Compare
@swift-ci please test |
18d16d4
to
e43fa39
Compare
@swift-ci please test |
e43fa39
to
6c4c373
Compare
@swift-ci please test |
6c4c373
to
7e224da
Compare
@swift-ci please test |
@ahoppen sadly I wasn't able to remove the So started just moving into |
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. Looks really good to me. As usual, I’ve got some comments though 😉
It’s a little unfortunate that we won’t be able to get all the way down to 0 gyb because AttributeKinds.py
is shared with the Swift repo but maybe one day.
if hasattr(attr, 'code'): | ||
parameters += ['code: %s' % attr.code] | ||
|
||
if class_name not in ['ContextualSimpleDeclAttribute', 'ContextualDeclAttribute'] and hasattr(attr, 'swift_name'): |
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.
Why do we need to explicitly exclude ContextualSimpleDeclAttribute
and ContextualDeclAttribute
here?
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.
Because those two don't use the swift_name
in the parameters
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.
Oh, mind adding that as a short explanation comment for the next one who stumbles over it?
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.
Added 💪
CodeGeneration/Sources/generate-swiftparser/GenerateSwiftParser.swift
Outdated
Show resolved
Hide resolved
7e224da
to
8352e25
Compare
de40ad2
to
5c33f8f
Compare
5c33f8f
to
7e80fa5
Compare
@swift-ci please test |
@swift-ci please test macOS |
@ahoppen
Let me know what you think.
My main idea is maybe to start removing the gyb dependency in this repo, so we only use Swift to generate the needed code.