Skip to content
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

Swift: refactor visitors to use translations #11094

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

redsun82
Copy link
Contributor

@redsun82 redsun82 commented Nov 3, 2022

This refactors all visitors to use translation style implementations with structured C++ classes (as opposed to visit and explicit traps). This was required as a preparation step for further work on making the extractor reliable against incomplete ASTs.

Also most explicit asserts have been removed, as they became obsolete with the assert in fetchLabel.

In the process of this there was

  • one fixed bug where the guard of CaseLabelItem was not being extracted
  • some schema changes from list[...] to list[optional[...]] that were required with the structured C++ classes

Commit by commit review is strongly encouraged.

@github-actions github-actions bot added the Swift label Nov 3, 2022
@redsun82 redsun82 changed the title Swift: refactor PatternVisitor to use translations Swift: refactor visitors to use translations Nov 3, 2022
@redsun82 redsun82 force-pushed the redsun82/swift-translators branch 3 times, most recently from ed84002 to 1459459 Compare Nov 3, 2022
@redsun82 redsun82 force-pushed the redsun82/swift-translators branch from 28398ec to e0eb820 Compare Nov 3, 2022
@redsun82 redsun82 marked this pull request as ready for review Nov 3, 2022
@redsun82 redsun82 requested a review from a team as a code owner Nov 3, 2022
Copy link
Contributor

@AlexDenisov AlexDenisov left a comment

The change looks reasonable 😄
Did you start the DCA experiment already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants