sclass WordTokReplacerWithSecondIn > WordTokReplacer {
  S secondIn;
  
  *(S sentence, Collection<S> vars, S *secondIn, LS replaced_multi) {
    super(sentence, vars, replaced_multi);
  }
  
  S rewrite(S s, SS map) {
    ret join(replaceCodeTokensUsingMap_curly(wordTok_noBrackets(s), map);
  }
  
  run {
    emit(WordTokReplacer(rewrite(secondIn, map), vars, map(tokReplaced, t -> rewrite(join(t), map))));
  }
}