class Haml::Generator

Limit methods since Haml doesn’t need most of them.
Ruby code generator, which is a limited version of Temple::Generator.

def call(exp)

def call(exp)
  compile(exp)
end

def concat(str)

def concat(str)
  "_hamlout.buffer << (#{str});"
end

def on_code(exp)

def on_code(exp)
  exp
end

def on_dynamic(code)

def on_dynamic(code)
  concat(code)
end

def on_multi(*exp)

def on_multi(*exp)
  exp.map { |e| compile(e) }.join('; ')
end

def on_newline

def on_newline
  "\n"
end

def on_static(text)

def on_static(text)
  concat(options[:freeze_static] ? "#{Util.inspect_obj(text)}.freeze" : Util.inspect_obj(text))
end