Skip to content

Commit cb5d00a

Browse files
committed
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.
1 parent 4eb55a9 commit cb5d00a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/repl_type_completor/type_analyzer.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,10 @@ def evaluate_alias_global_variable_node(_node, _scope) = Types::NIL
821821
def evaluate_undef_node(_node, _scope) = Types::NIL
822822
def evaluate_missing_node(_node, _scope) = Types::NIL
823823

824+
def evaluate_error_recovery_node(node, scope)
825+
node.unexpected ? evaluate(node.unexpected, scope) : Types::NIL
826+
end
827+
824828
def evaluate_call_node_arguments(call_node, scope)
825829
# call_node.arguments is Prism::ArgumentsNode
826830
arguments = call_node.arguments&.arguments&.dup || []

0 commit comments

Comments
 (0)