Skip to content

Use native prism#251

Draft
Earlopain wants to merge 7 commits intoruby:mainfrom
Earlopain:use-native-prism
Draft

Use native prism#251
Earlopain wants to merge 7 commits intoruby:mainfrom
Earlopain:use-native-prism

Conversation

@Earlopain
Copy link
Contributor

WIP to check CI with older prism versions. Depends on other PRs, might do some extra cleanup

I want to start porting this to prism without the translation layer.
Allows to remove some compatibility code with ripper
Maybe ripper fixed it since then. But prism also doesn't have this problem.
I had a bit of trouble following what is going on.
Lexing produces tokens, this renames to reflect that.
Also add tests for the other types which currently don't have one
@Earlopain Earlopain force-pushed the use-native-prism branch 3 times, most recently from 72b8a10 to 328a73b Compare February 25, 2026 12:28
It mostly continues to rely on tokens.
But for a few things like endless method defs
and multiline method continuations
it uses AST. These are either very difficult
or not possible to find just by checking tokens.

Because of multiline method calls, comments now don't need to be trimmed anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant