@@ -7,13 +7,6 @@ module ResPrinter = Res_printer
77module Scanner = Res_scanner
88module Parser = Res_parser
99
10- module LoopProgress = struct
11- let list_rest list =
12- match list with
13- | [] -> assert false
14- | _ :: rest -> rest
15- end
16-
1710let mk_loc start_loc end_loc =
1811 Location. {loc_start = start_loc; loc_end = end_loc; loc_ghost = false }
1912
@@ -1549,19 +1542,6 @@ and parse_es6_arrow_expression ?(arrow_attrs = []) ?(arrow_start_pos = None)
15491542 :: rest
15501543 | [] -> parameters
15511544 in
1552- let parameters =
1553- (* Propagate any dots from type parameters to the first term *)
1554- let rec loop ~dot_in_type params =
1555- match params with
1556- | (TypeParameter _ as p ) :: _ ->
1557- let rest = LoopProgress. list_rest params in
1558- (* Tell termination checker about progress *)
1559- p :: loop ~dot_in_type rest
1560- | (TermParameter _ as p ) :: rest -> p :: rest
1561- | [] -> []
1562- in
1563- loop ~dot_in_type: false parameters
1564- in
15651545 let return_type =
15661546 match p.Parser. token with
15671547 | Colon ->
@@ -5749,7 +5729,7 @@ and parse_structure_item_region p =
57495729 ~loc: (mk_loc p.start_pos p.prev_end_pos)
57505730 ~attrs expr)
57515731 | _ -> None )
5752- [@@ progress Parser. next, Parser. expect, LoopProgress. list_rest ]
5732+ [@@ progress Parser. next, Parser. expect]
57535733
57545734(* include-statement ::= include module-expr *)
57555735and parse_include_statement ~attrs p =
@@ -6402,7 +6382,7 @@ and parse_signature_item_region p =
64026382 (Diagnostics. message (ErrorMessages. attribute_without_node attr));
64036383 Some Recover. default_signature_item
64046384 | _ -> None )
6405- [@@ progress Parser. next, Parser. expect, LoopProgress. list_rest ]
6385+ [@@ progress Parser. next, Parser. expect]
64066386
64076387(* module rec module-name : module-type { and module-name: module-type } *)
64086388and parse_rec_module_spec ~attrs ~start_pos p =
0 commit comments