summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parsing/parsetree.mli25
1 files changed, 20 insertions, 5 deletions
diff --git a/parsing/parsetree.mli b/parsing/parsetree.mli
index 7bf5537c6..a9237b026 100644
--- a/parsing/parsetree.mli
+++ b/parsing/parsetree.mli
@@ -17,14 +17,19 @@ open Asttypes
(** {2 Extension points} *)
type attribute = string loc * payload
- (* [@id ARG]
- [@@id ARG]
+ (* [@id ARG]
+ [@@id ARG]
+
+ Metadata containers passed around within the AST.
+ The compiler ignores unknown attributes.
*)
and extension = string loc * payload
(* [%id ARG]
[%%id ARG]
- *)
+
+ Sub-language placeholder -- rejected by the typechecker.
+ *)
and attributes = attribute list
@@ -115,7 +120,12 @@ and row_field =
[`A of T] ( false, [T] )
[`A of T1 & .. & Tn] ( false, [T1;...Tn] )
[`A of & T1 & .. & Tn] ( true, [T1;...Tn] )
- *)
+
+ - The 2nd field is true if the tag contains a
+ constant (empty) constructor.
+ - '&' occurs when several types are used for the same constructor
+ (see 4.2 in the manual)
+ *)
| Rinherit of core_type
(* [ T ] *)
@@ -682,7 +692,11 @@ and structure_item_desc =
| Pstr_modtype of module_type_declaration
(* module type S = MT *)
| Pstr_open of override_flag * Longident.t loc * attributes
- (* open X *)
+ (* open! X - true
+ open X - false
+
+ override_flag silences the 'used identifier shadowing' warning
+ *)
| Pstr_class of class_declaration list
(* class c1 = ... and ... and cn = ... *)
| Pstr_class_type of class_type_declaration list
@@ -719,6 +733,7 @@ and module_binding =
type toplevel_phrase =
| Ptop_def of structure
| Ptop_dir of string * directive_argument
+ (* #use, #load ... *)
and directive_argument =
| Pdir_none