2016-02-18 07:11:59 -08:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* OCaml *)
|
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
|
|
|
(* en Automatique. *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. This file is distributed under the terms of *)
|
|
|
|
(* the GNU Lesser General Public License version 2.1, with the *)
|
|
|
|
(* special exception on linking described in the file LICENSE. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
1995-08-09 08:06:35 -07:00
|
|
|
|
2016-05-03 04:18:15 -07:00
|
|
|
(** Auxiliary AST types used by parsetree and typedtree. *)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
type constant =
|
|
|
|
Const_int of int
|
|
|
|
| Const_char of char
|
2013-03-26 04:17:17 -07:00
|
|
|
| Const_string of string * string option
|
1995-05-04 03:15:53 -07:00
|
|
|
| Const_float of string
|
2003-04-25 05:27:31 -07:00
|
|
|
| Const_int32 of int32
|
|
|
|
| Const_int64 of int64
|
|
|
|
| Const_nativeint of nativeint
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2013-04-04 05:38:20 -07:00
|
|
|
type rec_flag = Nonrecursive | Recursive
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
type direction_flag = Upto | Downto
|
|
|
|
|
2014-04-03 05:09:48 -07:00
|
|
|
(* Order matters, used in polymorphic comparison *)
|
1996-04-22 04:15:41 -07:00
|
|
|
type private_flag = Private | Public
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
type mutable_flag = Immutable | Mutable
|
|
|
|
|
1996-04-22 04:15:41 -07:00
|
|
|
type virtual_flag = Virtual | Concrete
|
1999-11-30 08:07:38 -08:00
|
|
|
|
2010-04-07 20:58:41 -07:00
|
|
|
type override_flag = Override | Fresh
|
|
|
|
|
2009-09-12 05:41:07 -07:00
|
|
|
type closed_flag = Closed | Open
|
|
|
|
|
1999-11-30 08:07:38 -08:00
|
|
|
type label = string
|
2012-05-30 07:52:37 -07:00
|
|
|
|
2014-12-22 00:45:55 -08:00
|
|
|
type arg_label =
|
|
|
|
Nolabel
|
|
|
|
| Labelled of string (* label:T -> ... *)
|
|
|
|
| Optional of string (* ?label:T -> ... *)
|
|
|
|
|
2012-05-30 07:52:37 -07:00
|
|
|
type 'a loc = 'a Location.loc = {
|
|
|
|
txt : 'a;
|
|
|
|
loc : Location.t;
|
|
|
|
}
|
2013-04-02 08:33:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
type variance =
|
|
|
|
| Covariant
|
|
|
|
| Contravariant
|
|
|
|
| Invariant
|