-
Notifications
You must be signed in to change notification settings - Fork 6
Gut out remaining PrismDesugar.cc logic
#829
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
base: rm-legacy-parser
Are you sure you want to change the base?
Conversation
Co-authored-by: Jesse Johnson <[email protected]>
Co-authored-by: Thomas Marshall <[email protected]>
Co-authored-by: Jesse Johnson <[email protected]>
Co-authored-by: Jesse Johnson <[email protected]>
Co-authored-by: Jesse Johnson <[email protected]>
Co-authored-by: Jesse Johnson <[email protected]>
Co-authored-by: Jesse Johnson <[email protected]>
Co-authored-by: Jesse Johnson <[email protected]>
Co-authored-by: Thomas Marshall <[email protected]>
Co-authored-by: Alexander Momchilov <[email protected]> Co-authored-by: Thomas Marshall <[email protected]>
Co-authored-by: Alexander Momchilov <[email protected]>
PM_ALIAS_METHOD_NODE return expr_only
…OLATED_STRING_NODE, PM_INTERPOLATED_REGULAR_EXPRESSION_NODE return expr_only
… helper PM_BREAK_NODE, PM_NEXT_NODE, PM_RETURN_NODE are refactored to called to desugarBreakNextReturn and return expr_only Co-authored-by: Thomas Marshall <[email protected]> Co-authored-by: Jesse Johnson <[email protected]>
Delete `parser::NodeWithExpr`
Replace: `auto (.+) = (.+);\n?\n +return expr_only\(move\(\1\)(,.*)?\);` With: `return $2;`
|
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
| 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, |
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.
Interesting behaviour: Sorbet.run
Looks intentional?
sorbet@b78c32a#diff-d007a9992fbeb69b231e49e539a717ff3e3bb3d9961b569fd1d83d0034ba9211
aaea70d to
100555a
Compare

Motivation
Test plan
See included automated tests.