package libsail

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Libsail.Jib_visitorSource

Sourcetype 'a visit_action =
  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. | DoChildrenPost of unit -> unit
    (*

    Continue with the chuldren of the node the same as DoChildren. However run the provided function after visiting the children

    *)
  4. | ChangeTo of 'a
    (*

    Replace the expression with the given one

    *)
  5. | 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

    *)
Sourceval do_visit : 'v -> 'a visit_action -> ('v -> 'a -> 'a) -> 'a -> 'a
Sourceval change_do_children : 'a -> 'a visit_action
Sourceval map_no_copy : ('a -> 'a) -> 'a list -> 'a list
Sourceval map_no_copy_opt : ('a -> 'a) -> 'a option -> 'a option
Sourceclass type common_visitor = object ... end
Sourceclass type jib_visitor = object ... end
Sourceval visit_name : common_visitor -> Jib.name -> Jib.name
Sourceval visit_ctyp : common_visitor -> Jib.ctyp -> Jib.ctyp
Sourceval visit_cval : jib_visitor -> Jib.cval -> Jib.cval
Sourceval visit_init : jib_visitor -> Jib.init -> Jib.init
Sourceval visit_clexp : jib_visitor -> Jib.clexp -> Jib.clexp
Sourceval visit_instr : jib_visitor -> Jib.instr -> Jib.instr
Sourceval visit_instrs : jib_visitor -> Jib.instr list -> Jib.instr list
Sourceval visit_cdef : jib_visitor -> Jib.cdef -> Jib.cdef
Sourceval visit_cdefs : jib_visitor -> Jib.cdef list -> Jib.cdef list