def visit_def(node)
# [:def,
# [:@ident, "foo", [1, 6]],
# [:params, nil, nil, nil, nil, nil, nil, nil],
# [:bodystmt, [[:void_stmt]], nil, nil, nil]]
#
# OR For endless methods (in 3.0)
# [:def,
# [:@ident, "foo", [1, 6]],
# nil,
# [:string_literal, [:string_content, [:@tstring_content, "bar", [1, 11]
# OR For endless methods (in 3.1)
# [:def,
# [:@ident, "foo", [1, 6]],
# nil,
# [:bodystmt,
# [:string_literal, [:string_content, [:@tstring_content, "bar", [1, 11]
_, name, params, body = node
consume_keyword "def"
consume_space
push_hash(node) do
visit_def_from_name name, params, body
end
end