Sha256: c64d1a1088056d32b35ee830bee3cf423e4c0f67250073c578ffad7dabd69139

Contents?: true

Size: 833 Bytes

Versions: 206

Compression:

Stored size: 833 Bytes

Contents

require 'sass/tree/node'

module Sass::Tree
  # A dynamic node representing a Sass `@while` loop.
  #
  # @see Sass::Tree
  class WhileNode < Node
    # @param expr [Script::Node] The parse tree for the continue expression
    def initialize(expr)
      @expr = expr
      super()
    end

    protected

    # Runs the child nodes until the continue expression becomes false.
    #
    # @param environment [Sass::Environment] The lexical environment containing
    #   variable and mixin values
    # @return [Array<Tree::Node>] The resulting static nodes
    # @see Sass::Tree
    def _perform(environment)
      children = []
      new_environment = Sass::Environment.new(environment)
      while @expr.perform(environment).to_bool
        children += perform_children(new_environment)
      end
      children
    end
  end
end

Version data entries

206 entries across 205 versions & 7 rubygems

Version Path
haml-2.2.18 lib/sass/tree/while_node.rb
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.8/gems/haml-2.2.17/lib/sass/tree/while_node.rb
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.9.1/gems/haml-2.2.17/lib/sass/tree/while_node.rb
haml-2.2.17 lib/sass/tree/while_node.rb
middleman-0.12.2 lib/middleman/vendor/gems/gems/haml-2.2.16/lib/sass/tree/while_node.rb
simple-templater-0.0.1.4 gems/gems/haml-2.2.16/lib/sass/tree/while_node.rb
haml-2.2.16 lib/sass/tree/while_node.rb
middleman-0.12.1 lib/middleman/vendor/gems/gems/haml-2.2.15/lib/sass/tree/while_node.rb
middleman-0.12.0.pre3 lib/middleman/vendor/gems/gems/haml-2.2.15/lib/sass/tree/while_node.rb
haml-edge-2.3.100 lib/sass/tree/while_node.rb
middleman-0.12.0.pre2 lib/middleman/vendor/gems/gems/haml-2.2.15/lib/sass/tree/while_node.rb
haml-edge-2.3.99 lib/sass/tree/while_node.rb
haml-edge-2.3.98 lib/sass/tree/while_node.rb
haml-2.2.15 lib/sass/tree/while_node.rb
haml-edge-2.3.97 lib/sass/tree/while_node.rb
haml-edge-2.3.96 lib/sass/tree/while_node.rb
haml-edge-2.3.95 lib/sass/tree/while_node.rb
haml-edge-2.3.94 lib/sass/tree/while_node.rb
middleman-0.12.0.pre lib/middleman/vendor/gems/gems/haml-2.2.14/lib/sass/tree/while_node.rb
haml-edge-2.3.93 lib/sass/tree/while_node.rb