package carray.ast;

import polyglot.ast.Node;
import polyglot.ast.NodeOps;
import carray.visit.ArrayInitRemover;

/**
 * Define a collection of operations that any CArray-compatible node must
 * implement.  This interface allows extensions both to override and reuse
 * functionality in CArrayExt.
 */
public interface CArrayOps extends NodeOps {

    /**
     * Prepare the given {@code ArrayInitRemover} for visiting children of this
     * AST node.
     * @param v
     * @return
     */
    ArrayInitRemover removeArrayInitEnter(ArrayInitRemover v);

    /**
     * Remove all array initializers that are not part of an array instance
     * creation expression.
     * @param v
     * @return
     */
    Node removeArrayInit(ArrayInitRemover v);
}
