-
Notifications
You must be signed in to change notification settings - Fork 439
[5.9] Fix for some wrong attribute fix its #1688
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
[5.9] Fix for some wrong attribute fix its #1688
Conversation
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.
Parser change is minimal and safe. The lexer will never create an identifier lexeme inside after an open string quote in valid source code.
DiagnosticSpec( | ||
locationMarker: "1️⃣", | ||
message: #"expected '"' in string literal"#, | ||
fixIts: [#"insert '"'"#] | ||
), | ||
DiagnosticSpec( | ||
locationMarker: "2️⃣", | ||
message: #"expected '"' to end string literal"#, | ||
fixIts: [#"insert '"'"#] | ||
), | ||
], |
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.
How difficult is it to make this a single diagnostic? Seems a little weird as two to me, ie. I would expect a surround '...' in '"'
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.
Filed #1691. We can take care of this on main
, it’s not necessary to do it for Swift 5.9.
@swift-ci Please test |
@swift-ci please test |
…-of-quote-tokens Fix for some wrong attribute fix its
2327497
to
eba6f40
Compare
@swift-ci please test |
@swift-ci please test windows |
1 similar comment
@swift-ci please test windows |
_originallyDefinedIn
,_unavailableFromAsync
and_expose
. The parser tought it was an identifier so it skipped.Now it consumes an identifier and remap it so a string segment