@Nullable
  static String wrapCode(@NotNull OptionalToIfContext context, @NotNull List<OperationRecord> records, @NotNull String code) {
    for (int i = records.size() - 1; i >= 0; i--) {
      OperationRecord record = records.get(i);
      Operation operation = record.myOperation;
      ChainVariable inVar = record.myInVar;
      ChainVariable outVar = record.myOutVar;
      code = operation.generate(inVar, outVar, code, context);
      if (code == null) return null;
      if (operation instanceof IntermediateOperation.Or) {
        context.addBeforeStep(outVar.getDeclaration("null"));
        context.setElseBranch(null);
        List<OperationRecord> rest = records.subList(0, i);
        String beforeCode = wrapCode(context, rest, outVar.getName() + "=" + inVar.getName() + ";");
        if (beforeCode == null) return null;
        return beforeCode + code;
      }
    }
    return code;
  }
@Nullable
  static String wrapCode(@NotNull OptionalToIfContext context, @NotNull List<OperationRecord> records, @NotNull String code)