def transform_params(param_node, scope_stack)
      param_node = param_node[1] if param_node[0] == :paren
      if param_node
        positional_1, optional, rest, positional_2, block = param_node[1..5]
        add_variable_list(positional_1, scope_stack, false) if positional_1
        if optional
          optional.each do |var, value|
            # MUST walk value first. (def foo(y=y); end) == (def foo(y=y()); end)
            transform_tree(value, scope_stack)
            add_variables_from_node(var, scope_stack, false)
          end
        end
        if rest && rest[1]
          add_variables_from_node(rest, scope_stack, false)
        end
        add_variable_list(positional_2, scope_stack, false) if positional_2
        add_variables_from_node(block, scope_stack, false) if block
      end
    end
def transform_params(param_node, scope_stack)
      param_node = param_node[1] if param_node[0] == :paren
      if param_node
        positional_1, optional, rest, positional_2, block = param_node[1..5]
        add_variable_list(positional_1, scope_stack, false) if positional_1
        if optional
          optional.each do |var, value|
            # MUST walk value first. (def foo(y=y); end) == (def foo(y=y()); end)
            transform_tree(value, scope_stack)
            add_variables_from_node(var, scope_stack, false)
          end
        end
        if rest && rest[1]
          add_variables_from_node(rest, scope_stack, false)
        end
        add_variable_list(positional_2, scope_stack, false) if positional_2
        add_variables_from_node(block, scope_stack, false) if block
      end
    end
Transforms a parameter list, and adds the new variables to current scope.
 Used by both block args and method args.