From cb5d00aa650864b8e2acbb9452d8519335437cbe Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Fri, 20 Mar 2026 23:30:44 -0400 Subject: [PATCH] ErrorRecoveryNode for prism We are going to introduce a catch-all error recovery node in prism. In order to get it merged, I need this merged and updated in CRuby. --- lib/repl_type_completor/type_analyzer.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/repl_type_completor/type_analyzer.rb b/lib/repl_type_completor/type_analyzer.rb index daad501..c14357d 100644 --- a/lib/repl_type_completor/type_analyzer.rb +++ b/lib/repl_type_completor/type_analyzer.rb @@ -821,6 +821,10 @@ def evaluate_alias_global_variable_node(_node, _scope) = Types::NIL def evaluate_undef_node(_node, _scope) = Types::NIL def evaluate_missing_node(_node, _scope) = Types::NIL + def evaluate_error_recovery_node(node, scope) + node.unexpected ? evaluate(node.unexpected, scope) : Types::NIL + end + def evaluate_call_node_arguments(call_node, scope) # call_node.arguments is Prism::ArgumentsNode arguments = call_node.arguments&.arguments&.dup || []