class Haml::Compiler

def compile(node)

def compile(node)
  parent = instance_variable_defined?('@node') ? @node : nil
  @node = node
  if node.children.empty?
    send(:"compile_#{node.type}")
  else
    send(:"compile_#{node.type}") {node.children.each {|c| compile c}}
  end
ensure
  @node = parent
end