.bundle/ruby/2.0.0/gems/sass-3.4.2/lib/sass/tree/visitors/perform.rb
# Returns a static DirectiveNode if this is importing a CSS file,
# or parses and includes the imported Sass file.
Returns a static DirectiveNode if this is importing a CSS file,
or parses and includes the imported Sass file.
Returns a static DirectiveNode if this is importing a CSS file or parses and includes the imported Sass file .
def visit_import(node)
    if (path = node.css_import?)
      resolved_node = Sass::Tree::CssImportNode.resolved("url(#{path})")
      resolved_node.source_range = node.source_range
      return resolved_node
    end
    file = node.imported_file
    if @environment.stack.frames.any? {|f| f.is_import? && f.filename == file.options[:filename]}
      handle_import_loop!(node)
    end
    begin
      @environment.stack.with_import(node.filename, node.line) do
        root = file.to_tree
        Sass::Tree::Visitors::CheckNesting.visit(root)
        node.children = root.children.map {|c| visit(c)}.flatten
        node
      end
    rescue Sass::SyntaxError => e
      e.modify_backtrace(:filename => node.imported_file.options[:filename])
      e.add_backtrace(:filename => node.filename, :line => node.line)
      raise e
    end
  end
def visit_import ( node ) if ( path = node . css_import? ) resolved_node = Sass :: Tree :: CssImportNode . resolved ( "url(#{path})" ) resolved_node . source_range = node . source_range return resolved_node end file = node . imported_file if @environment . stack . frames . any? { | f | f . is_import? && f . filename == file . options [ :filename ] } handle_import_loop! ( node ) end begin @environment . stack . with_import ( node . filename , node . line ) do root = file . to_tree Sass :: Tree :: Visitors :: CheckNesting . visit ( root ) node . children = root . children . map { | c | visit ( c ) } . flatten node end rescue Sass :: SyntaxError => e e . modify_backtrace ( :filename => node . imported_file . options [ :filename ] ) e . add_backtrace ( :filename => node . filename , :line => node . line ) raise e end end
Returns a static DirectiveNode if this is importing a CSS file,
or parses and includes the imported Sass file.
Returns a static DirectiveNode if this is importing a CSS file or parses and includes the imported Sass file .
node