Implement Prism -> Sorbet translation for "simple" keywords #227
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
These 14 Prism nodes model simple keywords, and only carry basic location information:
PM_FALSE_NODE
– Already implemented. This PR just refactors it.PM_FORWARDING_ARGUMENTS_NODE
- Newly implemented in this PR.PM_FORWARDING_PARAMETER_NODE
- Newly implemented in this PR.PM_IMPLICIT_REST_NODE
- Skipped for now. It's complicated.PM_IT_LOCAL_VARIABLE_READ_NODE
– Skipped for now. It's complicated. See Implement Prism -> Sorbet translation forit
keyword #228.PM_IT_PARAMETERS_NODE
- Skipped for now. It's complicated. See Implement Prism -> Sorbet translation forit
keyword #228.PM_MISSING_NODE
– Skipped for nowPM_NIL_NODE
– Already implemented. This PR just refactors it.PM_REDO_NODE
- Newly implemented in this PR.PM_RETRY_NODE
- Newly implemented in this PR.PM_SELF_NODE
– Already implemented. This PR just refactors it.PM_SOURCE_ENCODING_NODE
- Newly implemented in this PR.PM_SOURCE_LINE_NODE
- Newly implemented in this PR.PM_TRUE_NODE
– Already implemented. This PR just refactors it.This PR extracts a helper for generating these more simply, and then uses it to implement more of these keywords.
Closes #91.
Closes #92.
Closes #155.
Closes #162.
Closes #168.
Closes #170.
Depends on some commits from #224.