Skip to content

Commit

Permalink
Remove deadcode for RBI::Parser::TreeBuilder::visit_def_node
Browse files Browse the repository at this point in the history
  • Loading branch information
shopify-codedb[bot] committed Feb 22, 2025
1 parent 65dd068 commit 7df4477
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions lib/rbi/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,28 +256,6 @@ def visit_constant_assign(node)
end
end

# @override
#: (Prism::DefNode node) -> void
def visit_def_node(node)
@last_node = node

# We need to collect the comments with `current_sigs_comments` _before_ visiting the parameters to make sure
# the method comments are properly associated with the sigs and not the parameters.
sigs = current_sigs
comments = detach_comments_from_sigs(sigs) + node_comments(node)
params = parse_params(node.parameters)

current_scope << Method.new(
node.name.to_s,
params: params,
sigs: sigs,
loc: node_loc(node),
comments: comments,
is_singleton: !!node.receiver,
)
@last_node = nil
end

# @override
#: (Prism::ModuleNode node) -> void
def visit_module_node(node)
Expand Down

0 comments on commit 7df4477

Please sign in to comment.