-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implement Prism -> Sorbet translation for anonymous Array and Hash splats #232
Conversation
262ceca
to
7d5cc91
Compare
bd06e33
to
09e8803
Compare
It was still a copy of `def_kw_rest_params`, and were still testing method defs, not calls.
7d5cc91
to
84cdc53
Compare
unreachable("PM_ASSOC_SPLAT_NODE is handled separately in `Translator::translateHash()`, because its " | ||
"translation depends on whether its used in a hash or in a method call"); |
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.
This prevents us from needing to maintain a parsing context, that remembers whether this recursive call to Translator::translate()
originated from a PM_HASH_NODE
or a PM_KEYWORD_HASH_NODE
.
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.
Looks great!
84cdc53
to
c59eaea
Compare
Motivation
Builds on top of #42 and #225 to add support for anonymous splats.
Test plan
See included automated tests.