class Haml::Compiler::ChildrenCompiler

def moving_lineno(node, &block)

def moving_lineno(node, &block)
  # before: As they may have children, we need to increment lineno before compilation.
  case node.type
  when :script, :silent_script
    @lineno += 1
  when :tag
    [node.value[:dynamic_attributes].new, node.value[:dynamic_attributes].old].compact.each do |attribute_hash|
      @lineno += attribute_hash.count("\n")
    end
    @lineno += 1 if node.children.empty? && node.value[:parse]
  end
  temple = block.call # compile
  # after: filter may not have children, and for some dynamic filters we can't predict the number of lines.
  case node.type
  when :filter
    @lineno += TempleLineCounter.count_lines(temple)
  end
  temple
end