Called on match `\``
function consume_template (proc_stack) {
  let template = "`";
  proc_stack.tSkip(1);

  let escaping = 0;
  let done = false;

  while (!done) {
    let c = proc_stack.tAccept();
    if (c == "\\") {
      escaping ^= 1;

    } else {
      if (c == "`" && !escaping) {
        done = true;
      }

      escaping = 0;
    }

    template += c;
  }

  return template;
}