-
Notifications
You must be signed in to change notification settings - Fork 439
Improve unexpected tokens diagnostics #2811
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
Improve unexpected tokens diagnostics #2811
Conversation
…limiter in `canRecoverTo`
64ee567
to
4f3f7f8
Compare
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.
Looks great. Thank you @mateusrodriguesxyz!
@swift-ci Please test |
Couldn't figure out what caused the tests to fail 🤔 |
Looks like
|
Head branch was pushed to by a user without write access
4f3f7f8
to
b02a7f1
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
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.
Looks like a few files that used to parse correctly now no longer do.
Failed Tests (9):
Swift(macosx-x86_64) :: ModuleInterface/features.swift
Swift(macosx-x86_64) :: Parse/ConditionalCompilation/compiler.swift
Swift(macosx-x86_64) :: Parse/ConditionalCompilation/language_version_explicit.swift
Swift(macosx-x86_64) :: Parse/ConditionalCompilation/sequence_version.swift
Swift(macosx-x86_64) :: Parse/features.swift
Swift(macosx-x86_64) :: SILGen/specialize_attr.swift
Swift(macosx-x86_64) :: SILOptimizer/pre_specialize-macos.swift
Swift(macosx-x86_64) :: SILOptimizer/pre_specialize.swift
Swift(macosx-x86_64) :: SILOptimizer/pre_specialize_layouts.swift
These files are located in https://github.com/swiftlang/swift/tree/main/test
Oh, looks like the errors are unrelated to your PR, they also seem to fail in #2814. |
These failed in #2814 too. |
I think swiftlang/swift#76040 will fix this issue |
@ahoppen I think this should pass now that swiftlang/swift#76040 has been merged. Could you test again, please? |
@swift-ci please test |
Thanks @DougGregor ! |
While investigating #1373 I noticed that replacing a
break
with acontinue
incanRecoverTo
improves diagnostic in a number of recovery tests.I've also added a little logic to call
skipSingle
so we achieve desired diagnostic intestRecovery105()
, but only if possible at the same line, so cases liketestRecovery100()
is not messed up.