Skip to content

[CodeGeneration] Unify handling for node choices #2827

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

Conversation

AppAppWorks
Copy link
Contributor

Currently there are three separate implementations for generating node choices enum on the raw and non-raw sides, resulting in code duplication and inconsistencies. Besides, documentation, experimental note, and api attributes have also been omitted in the generation of node choices enum.

This PR aims to fix these issues by unifying and rectifying the facilities for code generation.

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Very nice cleanup. I only have a few minor comments.

@AppAppWorks AppAppWorks force-pushed the unify-code-generation-node-choices branch 2 times, most recently from bf35b3a to 147718f Compare August 28, 2024 04:02
Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

- unified code generation for node choices across raw and non-raw sides
- fixed missing doc comments, experimental note, and api attributes for node choices enum cases
- improved serial IfExpr generation
@AppAppWorks AppAppWorks force-pushed the unify-code-generation-node-choices branch from 147718f to 4d6b90a Compare August 28, 2024 19:53
@AppAppWorks
Copy link
Contributor Author

I've changed the generation of ifExpr from recursion-based to iteration-based, LGTM :)

@AppAppWorks
Copy link
Contributor Author

This PR should be ready for ci-test now :)

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

LGTM

@ahoppen
Copy link
Member

ahoppen commented Sep 4, 2024

@swift-ci Please test

@ahoppen ahoppen enabled auto-merge September 4, 2024 19:46
@ahoppen ahoppen merged commit 918c260 into swiftlang:main Sep 4, 2024
3 checks passed
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.

2 participants