void patch(@NotNull ASTNode parsedNode, @NotNull List<? extends PlaceInfo> placeInfos) {
    ((TreeElement)parsedNode).acceptTree(this);

    assert ((TreeElement)parsedNode).textMatches(catLeafs) :
      "Malformed PSI structure: leaf texts do not add up to the whole file text." +
      "\nFile text (from tree)  :'" + parsedNode.getText() + "'" +
      "\nFile text (from PSI)   :'" + parsedNode.getPsi().getText() + "'" +
      "\nLeaf texts concatenated:'" + catLeafs + "';" +
      "\nFile root: " + parsedNode +
      "\nLanguage: " + parsedNode.getPsi().getLanguage() +
      "\nHost file: " + placeInfos.get(0).host.getContainingFile().getVirtualFile();
    DebugUtil.performPsiModification("injection leaf patching", () -> {
      for (Map.Entry<LeafElement, String> entry : newTexts.entrySet()) {
        LeafElement leaf = entry.getKey();
        String newText = entry.getValue();
        leaf.rawReplaceWithText(newText);
      }
    });

    TreeUtil.clearCaches((TreeElement)parsedNode);
  }
void patch(@NotNull ASTNode parsedNode, @NotNull List<? extends PlaceInfo> placeInfos)