-
Notifications
You must be signed in to change notification settings - Fork 439
Address review comments to #1650 #1665
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
Address review comments to #1650 #1665
Conversation
@swift-ci Please test |
@@ -431,7 +457,7 @@ public class ParseDiagnosticsGenerator: SyntaxAnyVisitor { | |||
return .skipChildren | |||
} | |||
|
|||
if node.leftSquareBracket.presence == .missing && node.rightSquareBracket.presence == .present { | |||
if node.leftSquareBracket.isMissing && node.rightSquareBracket.presence == .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.
Personally I'm not a huge fan of introducing an accessor here. If you really want it then I'd also want a isPresent
. Or if we've decided there's only ever going to be two values here, then changing the .presence == .present
to !isMissing
would be another option.
369b18f
to
fea8c9a
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
fea8c9a
to
d9f839c
Compare
@swift-ci Please test |
""", | ||
diagnostics: [ | ||
DiagnosticSpec(message: "expected identifier in macro expansion", fixIts: ["insert identifier"]) | ||
DiagnosticSpec(locationMarker: "1️⃣", message: "extraneous whitespace after '#' is not permitted", fixIts: ["remove whitespace"]), |
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.
Bit weird to have both (1) and (2). Ideally we'd just have (2) with the trivia transferred to the trailing of the inserted identifier.
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.
Changed it in a separate commit to this PR.
@swift-ci Please test |
@swift-ci Please test Windows |
c8928df
to
1aaffd5
Compare
1aaffd5
to
6ca17a4
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
This addresses the review comments I made on swiftlang#1650. Co-Authored-By: Rintaro Ishizaki <rintaro@apple.com>
6ca17a4
to
8bd739d
Compare
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
@swift-ci Please test Windows |
@swift-ci Please clean test Windows |
This addresses the review comments I made on #1650.