class Opal::Nodes::BackRefNode

$+ (currently unsupported)
$&
$‘
$`
back_ref can be:

def compile

def compile
  helper :gvars
  case var_name
  when '&'
    handle_global_match
  when "'"
    handle_post_match
  when '`'
    handle_pre_match
  when '+'
    super
  else
    raise NotImplementedError
  end
end

def handle_global_match

def handle_global_match
  with_temp do |tmp|
    push "((#{tmp} = $gvars['~']) === nil ? nil : #{tmp}['$[]'](0))"
  end
end

def handle_post_match

def handle_post_match
  with_temp do |tmp|
    push "((#{tmp} = $gvars['~']) === nil ? nil : #{tmp}.$post_match())"
  end
end

def handle_pre_match

def handle_pre_match
  with_temp do |tmp|
    push "((#{tmp} = $gvars['~']) === nil ? nil : #{tmp}.$pre_match())"
  end
end