@@ -4885,19 +4885,24 @@ and parse_constr_decl_args p =
4885
4885
* | constr-name const-args
4886
4886
* | attrs constr-name const-args *)
4887
4887
and 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 ) ->
4890
4891
Parser. next p;
4891
4892
[doc_comment_to_attribute loc s]
4892
- | _ -> []
4893
+ | _ -> []
4893
4894
in
4894
4895
match p.Parser. token with
4895
4896
| Bar ->
4896
4897
let start_pos = p.Parser. start_pos in
4897
4898
Parser. next p;
4898
- let () = print_endline " 3" in
4899
4899
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
+ }
4901
4906
| _ -> None
4902
4907
4903
4908
and parse_type_constructor_declaration ~start_pos p =
@@ -4924,20 +4929,20 @@ and parse_type_constructor_declaration ~start_pos p =
4924
4929
4925
4930
(* [|] constr-decl { | constr-decl } *)
4926
4931
and parse_type_constructor_declarations ?first p =
4927
- let () = print_endline " 2" in
4928
4932
let first_constr_decl =
4929
4933
match first with
4930
4934
| 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 ) ->
4933
4938
Parser. next p;
4934
4939
[doc_comment_to_attribute loc s]
4935
- | _ -> []
4940
+ | _ -> []
4936
4941
in
4937
4942
let start_pos = p.Parser. start_pos in
4938
4943
ignore (Parser. optional p Token. Bar );
4939
4944
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}
4941
4946
| Some first_constr_decl -> first_constr_decl
4942
4947
in
4943
4948
first_constr_decl
@@ -4964,7 +4969,6 @@ and parse_type_representation ?current_type_name_path ?inline_types_context p =
4964
4969
let kind =
4965
4970
match p.Parser. token with
4966
4971
| Bar | Uident _ | DocComment _ ->
4967
- let () = print_endline " 1" in
4968
4972
Parsetree. Ptype_variant (parse_type_constructor_declarations p)
4969
4973
| Lbrace ->
4970
4974
Parsetree. Ptype_record
@@ -5518,7 +5522,6 @@ and parse_type_equation_and_representation ?current_type_name_path
5518
5522
p
5519
5523
| Private -> parse_private_eq_or_repr p
5520
5524
| Bar | DotDot | DocComment _ ->
5521
- let () = print_endline " xxx" in
5522
5525
(* DOCCOMMENT: Reached here if the first variant starts with |.
5523
5526
It is possible that the first variant may not have | (with multiple variants)
5524
5527
*)
@@ -5627,7 +5630,6 @@ and parse_type_definitions ~current_type_name_path ~inline_types_context ~attrs
5627
5630
* implemented for now. Needed to get a feel for the complexities of
5628
5631
* this territory of the grammar *)
5629
5632
and parse_type_definition_or_extension ~attrs p =
5630
- let () = print_endline " 0" in
5631
5633
let start_pos = p.Parser. start_pos in
5632
5634
Parser. expect Token. Typ p;
5633
5635
let rec_flag =
0 commit comments