lib/sass/tree/visitors/perform.rb
def visit_for(node)
    from = node.from.perform(@environment)
    to = node.to.perform(@environment)
    from.assert_int!
    to.assert_int!

    to = to.coerce(from.numerator_units, from.denominator_units)
    range = Range.new(from.to_i, to.to_i, node.exclusive)

    with_environment Sass::Environment.new(@environment) do
      range.map do |i|
        @environment.set_local_var(node.var,
          Sass::Script::Number.new(i, from.numerator_units, from.denominator_units))
        node.children.map {|c| visit(c)}
      end.flatten
    end
  end
# Runs the child nodes once for each time through the loop, varying the variable each time.
Runs the child nodes once for each time through the loop, varying the variable each time.
Runs the child nodes once for each time through the loop varying the variable each time .
def visit_for(node)
    from = node.from.perform(@environment)
    to = node.to.perform(@environment)
    from.assert_int!
    to.assert_int!
    to = to.coerce(from.numerator_units, from.denominator_units)
    range = Range.new(from.to_i, to.to_i, node.exclusive)
    with_environment Sass::Environment.new(@environment) do
      range.map do |i|
        @environment.set_local_var(node.var,
          Sass::Script::Number.new(i, from.numerator_units, from.denominator_units))
        node.children.map {|c| visit(c)}
      end.flatten
    end
  end
def visit_for ( node ) from = node . from . perform ( @environment ) to = node . to . perform ( @environment ) from . assert_int! to . assert_int! to = to . coerce ( from . numerator_units , from . denominator_units ) range = Range . new ( from . to_i , to . to_i , node . exclusive ) with_environment Sass :: Environment . new ( @environment ) do range . map do | i | @environment . set_local_var ( node . var , Sass :: Script :: Number . new ( i , from . numerator_units , from . denominator_units ) ) node . children . map { | c | visit ( c ) } end . flatten end end
Runs the child nodes once for each time through the loop, varying the variable each time.
Runs the child nodes once for each time through the loop varying the variable each time .
node