class SyntaxTree::YARV::Compiler::RubyVisitor

def visit_regexp_literal(node)

def visit_regexp_literal(node)
  if node.parts.length == 1 && node.parts.first.is_a?(TStringContent)
    Regexp.new(
      node.parts.first.value,
      visit_regexp_literal_flags(node)
    )
  else
    # Any interpolation of expressions or variables will result in the
    # regular expression being constructed at run-time.
    raise CompilationError
  end
end