-
Notifications
You must be signed in to change notification settings - Fork 440
[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
[CodeGeneration] Unify handling for node choices #2827
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.
Very nice cleanup. I only have a few minor comments.
CodeGeneration/Sources/generate-swift-syntax/ChildNodeChoices.swift
Outdated
Show resolved
Hide resolved
CodeGeneration/Sources/generate-swift-syntax/ChildNodeChoices.swift
Outdated
Show resolved
Hide resolved
bf35b3a
to
147718f
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.
Only open discussion is https://github.com/swiftlang/swift-syntax/pull/2827/files#r1733633656, otherwise LGTM.
CodeGeneration/Sources/generate-swift-syntax/ChildNodeChoices.swift
Outdated
Show resolved
Hide resolved
- 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
147718f
to
4d6b90a
Compare
I've changed the generation of ifExpr from recursion-based to iteration-based, LGTM :) |
This PR should be ready for ci-test now :) |
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.
LGTM
@swift-ci Please test |
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.