@Override
  public int getChildren(@NotNull ASTNode astNode, @NotNull Ref<ASTNode[]> into) {
    ASTNode child = astNode.getFirstChildNode();
    if (child == null) return 0;

    ASTNode[] store = into.get();
    if (store == null) {
      store = new ASTNode[10];
      into.set(store);
    }

    int count = 0;
    while (child != null) {
      if (count >= store.length) {
        ASTNode[] newStore = Arrays.copyOf(store, count * 3 / 2);
        into.set(newStore);
        store = newStore;
      }
      store[count++] = child;
      child = child.getTreeNext();
    }

    return count;
  }
@Override
  public int getChildren(@NotNull ASTNode astNode, @NotNull Ref<ASTNode[]> into)