fix(parser): harden Python and Ruby stack handling
Summary
- add explicit low-stack bailouts for Python recursive parser and reference-resolution helpers
- harden Ruby stack handling by guarding recursive expression extraction and growing the stack around Prism visitor traversal
- add low-stack regression tests for the new Python and Ruby paths
Testing
- cargo test -p parser-core bails_out_on_low_stack -- --nocapture
- cargo test -p parser-core test_prism_visitor_grows_stack_on_low_stack -- --nocapture
- cargo test -p parser-core test_expression_extraction_for_basic_use_cases -- --nocapture
- cargo test -p parser-core test_context_tracking -- --nocapture
Related
Relates to #449 (closed)