class Opal::Nodes::SuperNode

def compile

def compile
  if arglist == nil
    @implicit_args = true
    if containing_def_scope
      containing_def_scope.uses_zuper = true
      @arguments_without_block = [s(:js_tmp, '$zuper')]
      # If the method we're in has a block and we're using a default super call with no args, we need to grab the block
      # If an iter (block via braces) is provided, that takes precedence
      if (block_arg = formal_block_parameter) && !iter
        expr = s(:block_pass, s(:lvar, block_arg[1]))
        @arguments_without_block << expr
      end
    else
      @arguments_without_block = []
    end
  end
  super
end

def formal_block_parameter

def formal_block_parameter
  case containing_def_scope
    when Opal::Nodes::IterNode
      containing_def_scope.extract_block_arg
    when Opal::Nodes::DefNode
      containing_def_scope.block_arg
    else
      raise "Don't know what to do with scope #{containing_def_scope}"
  end
end