Module Annotation

module Annotation: sig .. end
Definition annotation file contents.

type error = 
| Empty_line
| Invalid_block_start of string
| Invalid_annotation of string
| Invalid_reference_kind of string
exception Exception of error
Exception to be raised when a function of this module fails.
type call = 
| Tail (*
Optimized tail call.
*)
| Stack (*
Normal stack call.
*)
| Inline (*
Inlined call.
*)
The kind of function calls.
type ident = 
| Definition (*
Identifier definition.
*)
| Internal_reference (*
Reference to internal identifier.
*)
| External_reference (*
Reference to external identifier.
*)
The kind of identifier uses.
type t = 
| Type of string (*
Expression type.
*)
| Call of call (*
Function call.
*)
| Ident of ident * string (*
Identifier use or definition.
*)
The kind of annotations.
type position = {
   filename : string; (*
File name of position.
*)
   line : int; (*
Line of position.
*)
   line_offset : int; (*
Offset of line beginning.
*)
   offset : int; (*
Offset of position (from file start).
*)
}
The type of file positions.
type block = {
   range_start : position; (*
Annotation start.
*)
   range_end : position; (*
Annotation end.
*)
   elements : t list; (*
Annotation elements.
*)
}
The type of blocks, that is a range and associated elements.
type file = block list 
The type representing the contents of a whole file.
val load_file : string -> file
Loads annotations from passed file, raising Exception if the file does not respect the format of annotations. Raises Sys_error if the file does not exist.