public @Nullable TextRange getRegionRange(@Nullable String region) {
    var visitor = new SnippetVisitor() {
      TextRange myRange = null;

      @Override
      public void visitPlainText(@NotNull PlainText plainText, @NotNull List<@NotNull LocationMarkupNode> activeNodes) {
        myRange = myRange == null ? plainText.range() : myRange.union(plainText.range());
      }
    };
    visitSnippet(region, visitor);
    return visitor.myRange;
  }
public @Nullable TextRange getRegionRange(@Nullable String region)