package asli

  1. Overview
  2. Docs
type 'a visitAction =
  1. | SkipChildren
    (*

    Do not visit the children. Return the node as it is.

    *)
  2. | DoChildren
    (*

    Continue with the children of this node. Rebuild the node on return if any of the children changes (use == test)

    *)
  3. | ChangeTo of 'a
    (*

    Replace the expression with the given one

    *)
  4. | ChangeDoChildrenPost of 'a * 'a -> 'a
    (*

    First consider that the entire exp is replaced by the first parameter. Then continue with the children. On return rebuild the node if any of the children has changed and then apply the function on the node

    *)

Different visiting actions. 'a will be instantiated with expr, stmt, etc.

val doVisit : 'v -> 'a visitAction -> ('v0 -> 'a0 -> 'a0) -> 'a1 -> 'a2
val mapNoCopy : ('a -> 'a) -> 'a0 list -> 'a1 list
val mapNoCopyList : ('a -> 'a list) -> 'a0 list -> 'a1 list
val mapOptionNoCopy : ('a -> 'a) -> 'a0 option -> 'a0 option
val doVisitList : 'v -> 'a list visitAction -> ('v0 -> 'a0 -> 'a0) -> 'a1 -> 'a2 list