Skip to content

Commit b9addb0

Browse files
committed
Remove function that does nothing.
1 parent 18b525f commit b9addb0

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

compiler/syntax/src/res_core.ml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ module ResPrinter = Res_printer
77
module Scanner = Res_scanner
88
module 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-
1710
let mk_loc start_loc end_loc =
1811
Location.{loc_start = start_loc; loc_end = end_loc; loc_ghost = false}
1912

@@ -1550,19 +1543,6 @@ and parse_es6_arrow_expression ?(arrow_attrs = []) ?(arrow_start_pos = None)
15501543
:: rest
15511544
| [] -> parameters
15521545
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
15661546
let return_type =
15671547
match p.Parser.token with
15681548
| Colon ->
@@ -5771,7 +5751,7 @@ and parse_structure_item_region p =
57715751
~loc:(mk_loc p.start_pos p.prev_end_pos)
57725752
~attrs expr)
57735753
| _ -> None)
5774-
[@@progress Parser.next, Parser.expect, LoopProgress.list_rest]
5754+
[@@progress Parser.next, Parser.expect]
57755755

57765756
(* include-statement ::= include module-expr *)
57775757
and parse_include_statement ~attrs p =
@@ -6424,7 +6404,7 @@ and parse_signature_item_region p =
64246404
(Diagnostics.message (ErrorMessages.attribute_without_node attr));
64256405
Some Recover.default_signature_item
64266406
| _ -> None)
6427-
[@@progress Parser.next, Parser.expect, LoopProgress.list_rest]
6407+
[@@progress Parser.next, Parser.expect]
64286408

64296409
(* module rec module-name : module-type { and module-name: module-type } *)
64306410
and parse_rec_module_spec ~attrs ~start_pos p =

0 commit comments

Comments
 (0)