-
Notifications
You must be signed in to change notification settings - Fork 447
When handling a missing layout node, only make the placeholder present #1894
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
Since `SourceLocation` is no longer `ExpressibleByDebugDescription` due to the addition of `presumedFile` and `presumedLine`, we need to manually print just line and column here.
5bcee2d
to
d51cdce
Compare
@swift-ci Please test |
let changes = missingNodes.map { node in | ||
if let missing = node.asProtocol(MissingNodeSyntax.self) { | ||
// For missing nodes, only make the placeholder present. Don’t make any | ||
// missing nodes, e.g. in a malformed attribute, missing. |
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.
// missing nodes, e.g. in a malformed attribute, missing. | |
// missing nodes, e.g. in a malformed attribute, present. |
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.
Out of interest, what other nodes were being made present? In eg. the @resultBuilder
test case, I would have expected the MissingDeclSyntax
to just have @resultBuilder
+ the placeholder
token.
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.
@_specialize(e
which contained a missing :
, identifier and )
in the attribute of the MissingDeclSyntax
, which was made present by the Fix-It.
Are you planning on adding docs for the other traits as well? |
This fixes a couple of formatting issues and resolves the question raised in swiftlang#1727 (comment).
d51cdce
to
caddfd1
Compare
I am planning to add documentation to the traits as much as I’m planning to add documentation to all the syntax nodes. How soon I/the community will get to it 🤷🏽♂️ |
@swift-ci Please test |
@swift-ci Please test Windows |
This fixes a couple of formatting issues and resolves the question raised in #1727 (comment).
While at it do the following
debugDescription
ofDiagnostic
SourceLocation
is no longerExpressibleByDebugDescription
due to the addition ofpresumedFile
andpresumedLine
, we need to manually print just line and column here.