@@ -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
@@ -1549,19 +1542,6 @@ and parse_es6_arrow_expression ?(arrow_attrs = []) ?(arrow_start_pos = None)
1549
1542
:: rest
1550
1543
| [] -> parameters
1551
1544
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
1565
1545
let return_type =
1566
1546
match p.Parser. token with
1567
1547
| Colon ->
@@ -5749,7 +5729,7 @@ and parse_structure_item_region p =
5749
5729
~loc: (mk_loc p.start_pos p.prev_end_pos)
5750
5730
~attrs expr)
5751
5731
| _ -> None )
5752
- [@@ progress Parser. next, Parser. expect, LoopProgress. list_rest ]
5732
+ [@@ progress Parser. next, Parser. expect]
5753
5733
5754
5734
(* include-statement ::= include module-expr *)
5755
5735
and parse_include_statement ~attrs p =
@@ -6402,7 +6382,7 @@ and parse_signature_item_region p =
6402
6382
(Diagnostics. message (ErrorMessages. attribute_without_node attr));
6403
6383
Some Recover. default_signature_item
6404
6384
| _ -> None )
6405
- [@@ progress Parser. next, Parser. expect, LoopProgress. list_rest ]
6385
+ [@@ progress Parser. next, Parser. expect]
6406
6386
6407
6387
(* module rec module-name : module-type { and module-name: module-type } *)
6408
6388
and parse_rec_module_spec ~attrs ~start_pos p =
0 commit comments