20 lines
536 B
OCaml
20 lines
536 B
OCaml
|
|
(** Long identifiers, used in parsetrees. *)
|
||
|
|
|
||
|
|
(** The long identifier type *)
|
||
|
|
type t =
|
||
|
|
(*IF_NOT_AT_LEAST 504 Ocaml_common.Longident.t = *)
|
||
|
|
| Lident of string
|
||
|
|
| Ldot of t * string
|
||
|
|
| Lapply of t * t
|
||
|
|
|
||
|
|
val flatten : t -> string list
|
||
|
|
(** Flatten a long identifier built upon [Lident] and [Ldot]. Raise when hitting
|
||
|
|
[Lapply].*)
|
||
|
|
|
||
|
|
val parse : string -> t
|
||
|
|
(** Parse a string into a long identifier built upon [Lident] and [Ldot]. *)
|
||
|
|
|
||
|
|
val to_compiler : t -> Ocaml_common.Longident.t
|
||
|
|
|
||
|
|
val from_compiler : Ocaml_common.Longident.t -> t
|