@@ -4885,19 +4885,24 @@ and parse_constr_decl_args p =
48854885 * | constr-name const-args
48864886 * | attrs constr-name const-args *)
48874887and parse_type_constructor_declaration_with_bar p =
4888- let doc_comment_attrs = match p.Parser. token with
4889- | DocComment (loc , s ) ->
4888+ let doc_comment_attrs =
4889+ match p.Parser. token with
4890+ | DocComment (loc , s ) ->
48904891 Parser. next p;
48914892 [doc_comment_to_attribute loc s]
4892- | _ -> []
4893+ | _ -> []
48934894 in
48944895 match p.Parser. token with
48954896 | Bar ->
48964897 let start_pos = p.Parser. start_pos in
48974898 Parser. next p;
4898- let () = print_endline " 3" in
48994899 let constr = parse_type_constructor_declaration ~start_pos p in
4900- Some ({constr with Parsetree. pcd_attributes = doc_comment_attrs @ constr.Parsetree. pcd_attributes})
4900+ Some
4901+ {
4902+ constr with
4903+ Parsetree. pcd_attributes =
4904+ doc_comment_attrs @ constr.Parsetree. pcd_attributes;
4905+ }
49014906 | _ -> None
49024907
49034908and parse_type_constructor_declaration ~start_pos p =
@@ -4924,20 +4929,20 @@ and parse_type_constructor_declaration ~start_pos p =
49244929
49254930(* [|] constr-decl { | constr-decl } *)
49264931and parse_type_constructor_declarations ?first p =
4927- let () = print_endline " 2" in
49284932 let first_constr_decl =
49294933 match first with
49304934 | None ->
4931- let doc_comment_attrs = match p.Parser. token with
4932- | DocComment (loc , s ) ->
4935+ let doc_comment_attrs =
4936+ match p.Parser. token with
4937+ | DocComment (loc , s ) ->
49334938 Parser. next p;
49344939 [doc_comment_to_attribute loc s]
4935- | _ -> []
4940+ | _ -> []
49364941 in
49374942 let start_pos = p.Parser. start_pos in
49384943 ignore (Parser. optional p Token. Bar );
49394944 let constr = parse_type_constructor_declaration ~start_pos p in
4940- {constr with pcd_attributes = doc_comment_attrs @ constr.pcd_attributes}
4945+ {constr with pcd_attributes = doc_comment_attrs @ constr.pcd_attributes}
49414946 | Some first_constr_decl -> first_constr_decl
49424947 in
49434948 first_constr_decl
@@ -4964,7 +4969,6 @@ and parse_type_representation ?current_type_name_path ?inline_types_context p =
49644969 let kind =
49654970 match p.Parser. token with
49664971 | Bar | Uident _ | DocComment _ ->
4967- let () = print_endline " 1" in
49684972 Parsetree. Ptype_variant (parse_type_constructor_declarations p)
49694973 | Lbrace ->
49704974 Parsetree. Ptype_record
@@ -5518,7 +5522,6 @@ and parse_type_equation_and_representation ?current_type_name_path
55185522 p
55195523 | Private -> parse_private_eq_or_repr p
55205524 | Bar | DotDot | DocComment _ ->
5521- let () = print_endline " xxx" in
55225525 (* DOCCOMMENT: Reached here if the first variant starts with |.
55235526 It is possible that the first variant may not have | (with multiple variants)
55245527 *)
@@ -5627,7 +5630,6 @@ and parse_type_definitions ~current_type_name_path ~inline_types_context ~attrs
56275630 * implemented for now. Needed to get a feel for the complexities of
56285631 * this territory of the grammar *)
56295632and parse_type_definition_or_extension ~attrs p =
5630- let () = print_endline " 0" in
56315633 let start_pos = p.Parser. start_pos in
56325634 Parser. expect Token. Typ p;
56335635 let rec_flag =
0 commit comments