Move liftTopLevel() logic into Prism translator#829
Closed
amomchilov wants to merge 5 commits intomasterfrom
Closed
Move liftTopLevel() logic into Prism translator#829amomchilov wants to merge 5 commits intomasterfrom
liftTopLevel() logic into Prism translator#829amomchilov wants to merge 5 commits intomasterfrom
Conversation
This was referenced Dec 19, 2025
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
node2TreeImplBody()PrismDesugar.cc logic
amomchilov
commented
Dec 19, 2025
| if (programNode->statements->body.size == 1) { | ||
| auto statement = desugar(programNode->statements->body.nodes[0]); | ||
|
|
||
| // If the one statement desugars into an instruction sequence of multiple statements, |
Author
There was a problem hiding this comment.
Interesting behaviour: Sorbet.run
Looks intentional?
sorbet@b78c32a#diff-d007a9992fbeb69b231e49e539a717ff3e3bb3d9961b569fd1d83d0034ba9211
aaea70d to
100555a
Compare
This was referenced Jan 9, 2026
bb386a2 to
769f3b5
Compare
dd7fe48 to
7b9d9d9
Compare
PrismDesugar.cc logicliftTopLevelI() logic into Prism translator
liftTopLevelI() logic into Prism translatorliftTopLevel() logic into Prism translator
7b9d9d9 to
a4b87e0
Compare
Author
|
Upstreaming in sorbet#9889 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
This doesn't need to be a post-processing step. Instead, it's just how the root
PM_PROGRAM_NODEshould be desugared in the first place.Test plan
Pure refactor, covered by existing desugar tests.