[rust] Modularize ruby-prism crate following Ruby's lib/prism structure #3884
+712
−644
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.
Summary
ruby-prismcrate to mirrorlib/prism/structurenode.rs:NodeList,ConstantList,Integer(likenode.rb)parse_result/mod.rs:ParseResult,Location(likeparse_result.rb)parse_result/comments.rs:Comment,MagicComment(likeparse_result/comments.rb)parse_result/diagnostics.rs:Diagnostic(likeparse_result/errors.rb)Verification
This is a pure structural refactoring with no behavioral changes. The following checks were performed to ensure no regressions:
Public API diff (using
cargo-public-api)Test case names comparison
All 23 test cases preserved with identical names before and after refactoring.
Documentation comments comparison
All doc comments match between before and after (excluding a typo fix:
arbitarily→arbitrarily).Test execution
All 23 tests pass.
Test plan
cargo test -p ruby-prismpasses (23 tests)cargo doc -p ruby-prismgenerates without warningscargo-public-api diff)🤖 Generated with Claude Code