class Haml::Compiler::ScriptCompiler

def compile(node, &block)

def compile(node, &block)
  unless Ripper.respond_to?(:lex) # No Ripper.lex in truffleruby
    return dynamic_compile(node, &block)
  end
  no_children = node.children.empty?
  case
  when no_children && node.value[:escape_interpolation]
    compile_interpolated_plain(node)
  when no_children && RubyExpression.string_literal?(node.value[:text])
    delegate_optimization(node)
  when no_children && Temple::StaticAnalyzer.static?(node.value[:text])
    static_compile(node)
  else
    dynamic_compile(node, &block)
  end
end