lib/sass/tree/visitors/perform.rb
def visit_import(node)
    if path = node.css_import?
      return Sass::Tree::DirectiveNode.new("@import url(#{path})")
    end
    file = node.imported_file
    handle_import_loop!(node) if @stack.any? {|e| e[:filename] == file.options[:filename]}

    @stack.push(:filename => node.filename, :line => node.line)
    root = file.to_tree
    Sass::Tree::Visitors::CheckNesting.visit(root)
    node.children = root.children.map {|c| visit(c)}.flatten
    node
  rescue Sass::SyntaxError => e
    e.modify_backtrace(:filename => node.imported_file.options[:filename])
    e.add_backtrace(:filename => node.filename, :line => node.line)
    raise e
  ensure
    @stack.pop unless path
  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.
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?
      return Sass::Tree::DirectiveNode.new("@import url(#{path})")
    end
    file = node.imported_file
    handle_import_loop!(node) if @stack.any? {|e| e[:filename] == file.options[:filename]}
    @stack.push(:filename => node.filename, :line => node.line)
    root = file.to_tree
    Sass::Tree::Visitors::CheckNesting.visit(root)
    node.children = root.children.map {|c| visit(c)}.flatten
    node
  rescue Sass::SyntaxError => e
    e.modify_backtrace(:filename => node.imported_file.options[:filename])
    e.add_backtrace(:filename => node.filename, :line => node.line)
    raise e
  ensure
    @stack.pop unless path
  end
def visit_import ( node ) if path = node . css_import? return Sass :: Tree :: DirectiveNode . new ( "@import url(#{path})" ) end file = node . imported_file handle_import_loop! ( node ) if @stack . any? { | e | e [ :filename ] == file . options [ :filename ] } @stack . push ( :filename => node . filename , :line => node . line ) root = file . to_tree Sass :: Tree :: Visitors :: CheckNesting . visit ( root ) node . children = root . children . map { | c | visit ( c ) } . flatten node rescue Sass :: SyntaxError => e e . modify_backtrace ( :filename => node . imported_file . options [ :filename ] ) e . add_backtrace ( :filename => node . filename , :line => node . line ) raise e ensure @stack . pop unless path 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