class Haml::Compiler

def compile_silent_script

def compile_silent_script
  return if @options[:suppress_eval]
  push_silent(@node.value[:text])
  keyword = @node.value[:keyword]
  if block_given?
    # Store these values because for conditional statements,
    # we want to restore them for each branch
    @node.value[:dont_indent_next_line] = @dont_indent_next_line
    @node.value[:dont_tab_up_next_text] = @dont_tab_up_next_text
    yield
    push_silent("end", :can_suppress) unless @node.value[:dont_push_end]
  elsif keyword == "end"
    if @node.parent.children.last.equal?(@node)
      # Since this "end" is ending the block,
      # we don't need to generate an additional one
      @node.parent.value[:dont_push_end] = true
    end
    # Don't restore dont_* for end because it isn't a conditional branch.
  elsif Parser::MID_BLOCK_KEYWORDS.include?(keyword)
    # Restore dont_* for this conditional branch
    @dont_indent_next_line = @node.parent.value[:dont_indent_next_line]
    @dont_tab_up_next_text = @node.parent.value[:dont_tab_up_next_text]
  end
end