Skip to content

Fix parser failures found by source alteration in test cases #1538

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

Merged
merged 1 commit into from
Apr 15, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 14, 2023

These parser failures were found by #1340.

  • There was one round-trip failure introduced by Fixed testAvailabilityQueryUnavailability34a #1464
  • A few cases were just consume tokens as the wrong child
  • The list of expected token kinds of DeclModifierSynax didn’t contain one modifier that was actually parsed

@ahoppen ahoppen requested a review from bnbarham April 14, 2023 01:30
@ahoppen
Copy link
Member Author

ahoppen commented Apr 14, 2023

@swift-ci Please test

}
""",
diagnostics: [
DiagnosticSpec(locationMarker: "1️⃣", message: "unexpected code '==' in 'if' statement")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add a fixit if we start to require it in #1467

Same for fixedSource below

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reminder

These parser failures were found by swiftlang#1340.

- There was one round-trip failure introduced by swiftlang#1464
- A few cases were just consume tokens as the wrong child
- The list of expected token kinds of `DeclModifierSynax` didn’t contain one modifier that was actually parsed
@ahoppen ahoppen force-pushed the ahoppen/source-alteration-fixes branch from b0b0586 to 1f95a65 Compare April 14, 2023 16:22
@ahoppen
Copy link
Member Author

ahoppen commented Apr 14, 2023

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Apr 15, 2023

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 4a8f381 into swiftlang:main Apr 15, 2023
@ahoppen ahoppen deleted the ahoppen/source-alteration-fixes branch April 15, 2023 15:01
ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Apr 18, 2023
…ion-fixes

Fix parser failures found by source alteration in test cases
ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Apr 18, 2023
…ion-fixes

Fix parser failures found by source alteration in test cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants