instance method
Prism::Translation::Parser::Compiler#visit_super_node
visit_super_node(node)
lib/prism/translation/parser/compiler.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/translation/parser/compiler.rb, line 1738
def visit_super_node(node)
arguments = node.arguments&.arguments || []
block = node.block
if block.is_a?(BlockArgumentNode)
arguments = [*arguments, block]
block = nil
end
visit_block(
builder.keyword_cmd(
:super,
token(node.keyword_loc),
token(node.lparen_loc),
visit_all(arguments),
token(node.rparen_loc)
),
block
)
end
super(foo) ^^^^^^^^^^