util.mli 503 B

12345678910111213
  1. (* Generate a fresh variable from a given prefix, e.g. "counter" -> "counter$1" *)
  2. val fresh_var : string -> string
  3. (* Generate an Ast.loc tuple from Lexing data structures *)
  4. val loc_from_lexpos : Lexing.position -> Lexing.position -> Ast.loc
  5. (* Default transformation traversal for AST nodes *)
  6. val transform_children : (Ast.node -> Ast.node) -> Ast.node -> Ast.node
  7. (*val visit_children : (Ast.node -> unit) -> Ast.node -> unit*)
  8. (* Extract location from node *)
  9. val locof : Ast.node -> Ast.loc