@@ -7,13 +7,6 @@ module ResPrinter = Res_printer
7
7
module Scanner = Res_scanner
8
8
module Parser = Res_parser
9
9
10
- module LoopProgress = struct
11
- let list_rest list =
12
- match list with
13
- | [] -> assert false
14
- | _ :: rest -> rest
15
- end
16
-
17
10
let mk_loc start_loc end_loc =
18
11
Location. {loc_start = start_loc; loc_end = end_loc; loc_ghost = false }
19
12
@@ -1550,19 +1543,6 @@ and parse_es6_arrow_expression ?(arrow_attrs = []) ?(arrow_start_pos = None)
1550
1543
:: rest
1551
1544
| [] -> parameters
1552
1545
in
1553
- let parameters =
1554
- (* Propagate any dots from type parameters to the first term *)
1555
- let rec loop ~dot_in_type params =
1556
- match params with
1557
- | (TypeParameter _ as p ) :: _ ->
1558
- let rest = LoopProgress. list_rest params in
1559
- (* Tell termination checker about progress *)
1560
- p :: loop ~dot_in_type rest
1561
- | (TermParameter _ as p ) :: rest -> p :: rest
1562
- | [] -> []
1563
- in
1564
- loop ~dot_in_type: false parameters
1565
- in
1566
1546
let return_type =
1567
1547
match p.Parser. token with
1568
1548
| Colon ->
@@ -5771,7 +5751,7 @@ and parse_structure_item_region p =
5771
5751
~loc: (mk_loc p.start_pos p.prev_end_pos)
5772
5752
~attrs expr)
5773
5753
| _ -> None )
5774
- [@@ progress Parser. next, Parser. expect, LoopProgress. list_rest ]
5754
+ [@@ progress Parser. next, Parser. expect]
5775
5755
5776
5756
(* include-statement ::= include module-expr *)
5777
5757
and parse_include_statement ~attrs p =
@@ -6424,7 +6404,7 @@ and parse_signature_item_region p =
6424
6404
(Diagnostics. message (ErrorMessages. attribute_without_node attr));
6425
6405
Some Recover. default_signature_item
6426
6406
| _ -> None )
6427
- [@@ progress Parser. next, Parser. expect, LoopProgress. list_rest ]
6407
+ [@@ progress Parser. next, Parser. expect]
6428
6408
6429
6409
(* module rec module-name : module-type { and module-name: module-type } *)
6430
6410
and parse_rec_module_spec ~attrs ~start_pos p =
0 commit comments