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
radiantcms-couchrest_model-0.1.4 vendor/plugins/haml/lib/sass/tree/while_node.rb
radiant-0.9.1 vendor/plugins/haml/lib/sass/tree/while_node.rb
haml-2.2.24 lib/sass/tree/while_node.rb
radiant-0.9.0.rc2 vendor/plugins/haml/lib/sass/tree/while_node.rb
haml-2.2.23 lib/sass/tree/while_node.rb
haml-edge-2.3.179 lib/sass/tree/while_node.rb
haml-edge-2.3.178 lib/sass/tree/while_node.rb
haml-edge-2.3.177 lib/sass/tree/while_node.rb
haml-edge-2.3.176 lib/sass/tree/while_node.rb
haml-edge-2.3.175 lib/sass/tree/while_node.rb
haml-2.2.22 lib/sass/tree/while_node.rb
haml-edge-2.3.174 lib/sass/tree/while_node.rb
haml-edge-2.3.173 lib/sass/tree/while_node.rb
haml-edge-2.3.172 lib/sass/tree/while_node.rb
haml-edge-2.3.171 lib/sass/tree/while_node.rb
haml-edge-2.3.170 lib/sass/tree/while_node.rb
haml-2.2.21 lib/sass/tree/while_node.rb
drnic-haml-2.3.1 lib/sass/tree/while_node.rb
haml-edge-2.3.169 lib/sass/tree/while_node.rb
haml-edge-2.3.168 lib/sass/tree/while_node.rb