-
Notifications
You must be signed in to change notification settings - Fork 440
Improve modeling of Child
in CodeGeneration
#1914
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
Conversation
@swift-ci Please test |
public let documentation: SwiftSyntax.Trivia | ||
|
||
/// The first line of the child's documentation | ||
public let documentationAbstract: String |
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've been thinking if this also should be using a Trivia
type but in the end a String
type makes more sense. Changing it would mean that in methods like this: func generateInitializerDocComment() -> SwiftSyntax.Trivia
we would have to use something like TriviaPiece.commentValue
property proposed in #1890.
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.
Yes, the problem is that we use this string for the parameter documentation of the node’s initializers. And for those, we don’t want it prefixed with ///
f8cc5a2
to
cc6fca0
Compare
cc6fca0
to
7b8e86b
Compare
@swift-ci Please test |
This also fixes a bug that caused multi-line documentation of children to be rendered incorrectly
7b8e86b
to
9adf2df
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
Two changes:
Child.varName
aTokenSyntax
Child.documentation
toTrivia