-
Notifications
You must be signed in to change notification settings - Fork 441
Add trailing trivia and with{Leading,Trailing}Trivia
to buildable nodes
#667
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 |
What do you intend to use |
My use case is fixing an interaction between VariableDecl(
attributes: [CustomAttribute("Test") { TupleExprElement(expression: "a") }],
modifiers: [Token.public],
.let,
name: "test",
type: "Int"
) generates @Test(a)public let test: Int The issue is that |
Thanks for the explanation. That makes sense 👍 |
2e5780f
to
e36232f
Compare
@swift-ci please test |
e36232f
to
a2b08a3
Compare
@swift-ci please test |
a2b08a3
to
63a7ace
Compare
@swift-ci please test |
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.
LGTM
@swift-ci Please test macOS |
Based on #666.
This PR adds a
trailingTrivia
field to buildableSwiftSyntaxBuilder
nodes, along withwithLeadingTrivia
/withTrailingTrivia
functions.To do:
trailingTrivia
to buildable nodesleadingTrivia
andtrailingTrivia
to buildable collection nodeswithLeadingTrivia
andwithTrailingTrivia
For a future PR:
withLeadingTrivia
/withTrailingTrivia
(e.g.HasLeadingTrivia
/HasTrailingTrivia
or just a combinedHasTrivia
) that buildable nodes, collection nodes and e.g. tokens could conform to