Merged
Conversation
Replace lib-ruby-parser (Ruby 3.1.2) with ruby-prism (Ruby 3.3+), the official Ruby parser with Rust bindings. This brings: - Support for Ruby 3.2, 3.3, 3.4+ syntax - Native handling of all encodings (ASCII, US-ASCII, etc.) - Error-tolerant parsing (always produces an AST) - Future-proof: prism is Ruby's default parser since 3.3 Key changes: - Cargo.toml: replace lib-ruby-parser with ruby-prism 1.9 - ast_helpers.rs: rewrite all helpers for prism node types (CallNode, DefNode, BlockNode, etc.) - ast_visitor.rs: rewrite visitor for prism's Node enum - analyzer.rs: adapt walk_node for Block/Call inversion (prism: CallNode owns BlockNode, not vice versa) - fix.rs: simplify verify_syntax using prism - comment_directives.rs: use prism's Comment iterator - All 4 scanners rewritten for prism node types - Remove custom ASCII encoding decoder (prism handles natively) All 244 tests pass. Zero clippy warnings.
- Visit DefNode parameters (default values can contain scannable code) - Remove unsafe ptr::read; replace body_expressions with safe body_expression_count/body_first_expression - Remove duplicate visit_rescue_chain_children (identical to visit_rescue_children) - Remove examples/prism_spike.rs (exploratory spike, not needed in release)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.