Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead method: RBI::Parser::TreeBuilder::visit_def_node #411

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading