Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Tokens.
The type of tokens is semi-structured: parentheses construct and quotations are nested and others tokens are flat list.
type location = {
idx1 : int;
Start position in unicode characters.
*)idx2 : int;
Stop position in unicode characters.
*)ofs1 : int;
Start position in bytes.
*)ofs2 : int;
Stop position in bytes.
*)}
Locations in the source string, which is encoded in UTF-8.
type t =
| Symbol of string
| Lident of string
| Uident of string
| Constant of string
| Char
| String of int * bool
String (quote_size, terminated)
.
| Comment of comment_kind * bool
Comment (kind, terminated)
.
| Blanks
| Error
| Quotation of (quotation_item * location) list * bool
Quotation (items, terminated)
.