| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- (* Logging functions, they print to stderr and consider the verbosity flag *)
- val prt_line : string -> unit
- val prt_node : Types.node -> unit
- val log_line : int -> string -> unit
- val log_node : int -> Types.node -> unit
- val dbg_line : string -> unit
- val dbg_node : Types.node -> unit
- (* Generate a fresh variable from a given prefix, e.g. "foo" -> "foo$1" *)
- val fresh_var : string -> string
- (* Generate a fresg constant from a given prefix, e.g. "foo" -> "foo$$1" *)
- val fresh_const : string -> string
- (* Generate an Types.location tuple from Lexing data structures *)
- val loc_from_lexpos : Lexing.position -> Lexing.position -> Types.location
- (* Default transformation traversal for AST nodes *)
- val transform_children : (Types.node -> Types.node) -> Types.node -> Types.node
- (* Add a single annotation to a node (no traversal) *)
- val annotate : Types.annotation -> Types.node -> Types.node
- (*val visit_children : (Types.node -> unit) -> Types.node -> unit*)
- (* Extract annotation from node *)
- val annof : Types.node -> Types.annotation list
- val locof : Types.node -> Types.location
- val depthof : Types.node -> int
- val indexof : Types.node -> int
- val typeof : Types.node -> Types.ctype
- val labelof : Types.node -> string
- (* Print file location to stderr *)
- val prerr_loc : Types.location -> unit
- (* Print file location to stderr *)
- val prerr_loc_msg : Types.location -> string -> unit
- (* Flatten Block nodes into the given array of nodes *)
- val flatten_blocks : Types.node list -> Types.node list
- (* Extract the node list from a Block node *)
- val block_body : Types.node -> Types.node list
- (* Get the size of a list by traversing it recurcively *)
- val list_size : 'a list -> int
- (* Get the basic type of a declaration, removing array dimensions *)
- val basetypeof : Types.node -> Types.ctype
- (* Get the number of dimensions from an Array type *)
- val array_depth : Types.ctype -> int
- (* Get name from variable or function declaration *)
- val nameof : Types.node -> string
- val optmap : ('a -> 'b) -> 'a list option -> 'b list option
- val optmapl : ('a -> 'b) -> 'a list option -> 'b list
- (* List.mapi clone (only available in OCaml version >= 4.00 *)
- val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list
|