[ruby/prism] Support elsif in ripper translation

0c008fcf34
This commit is contained in:
Kevin Newton 2024-03-06 01:30:26 -05:00 committed by git
parent 06d36f7d6d
commit d23ebdfa6d
2 changed files with 5 additions and 4 deletions

View file

@ -1488,7 +1488,11 @@ module Prism
consequent = visit(node.consequent)
bounds(node.location)
if node.if_keyword == "if"
on_if(predicate, statements, consequent)
else
on_elsif(predicate, statements, consequent)
end
else
statements = visit(node.statements.body.first)
predicate = visit(node.predicate)

View file

@ -57,16 +57,13 @@ module Prism
]
skips = incorrect | heredocs | %w[
if.txt
rescue.txt
seattlerb/TestRubyParserShared.txt
seattlerb/block_call_dot_op2_brace_block.txt
seattlerb/block_command_operation_colon.txt
seattlerb/block_command_operation_dot.txt
seattlerb/if_elsif.txt
unparser/corpus/literal/block.txt
unparser/corpus/literal/kwbegin.txt
whitequark/if_elsif.txt
whitequark/send_block_chain_cmd.txt
]