Skip to content

Commit 1ce54a0

Browse files
committed
remove Pexp_assert
1 parent adbb76c commit 1ce54a0

21 files changed

Lines changed: 15 additions & 70 deletions

analysis/src/DumpAst.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,6 @@ and printExprItem expr ~pos ~indentation =
234234
^ "\n" ^ addIndentation indentation ^ ")"
235235
| Pexp_extension (({txt} as loc), _) ->
236236
"Pexp_extension(%" ^ (loc |> printLocDenominatorLoc ~pos) ^ txt ^ ")"
237-
| Pexp_assert expr ->
238-
"Pexp_assert(" ^ printExprItem expr ~pos ~indentation ^ ")"
239237
| Pexp_field (exp, loc) ->
240238
"Pexp_field("
241239
^ (loc |> printLocDenominatorLoc ~pos)

analysis/src/Utils.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ let identifyPexp pexp =
109109
| Pexp_send _ -> "Pexp_send"
110110
| Pexp_letmodule _ -> "Pexp_letmodule"
111111
| Pexp_letexception _ -> "Pexp_letexception"
112-
| Pexp_assert _ -> "Pexp_assert"
113112
| Pexp_newtype _ -> "Pexp_newtype"
114113
| Pexp_pack _ -> "Pexp_pack"
115114
| Pexp_extension _ -> "Pexp_extension"

compiler/frontend/bs_ast_mapper.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ module E = struct
375375
letexception ~loc ~attrs
376376
(sub.extension_constructor sub cd)
377377
(sub.expr sub e)
378-
| Pexp_assert e -> assert_ ~loc ~attrs (sub.expr sub e)
379378
| Pexp_newtype (s, e) ->
380379
newtype ~loc ~attrs (map_loc sub s) (sub.expr sub e)
381380
| Pexp_pack me -> pack ~loc ~attrs (sub.module_expr sub me)

compiler/ml/ast_helper.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ module Exp = struct
189189
let send ?loc ?attrs a b = mk ?loc ?attrs (Pexp_send (a, b))
190190
let letmodule ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_letmodule (a, b, c))
191191
let letexception ?loc ?attrs a b = mk ?loc ?attrs (Pexp_letexception (a, b))
192-
let assert_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_assert a)
193192
let newtype ?loc ?attrs a b = mk ?loc ?attrs (Pexp_newtype (a, b))
194193
let pack ?loc ?attrs a = mk ?loc ?attrs (Pexp_pack a)
195194
let open_ ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_open (a, b, c))

compiler/ml/ast_helper.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ module Exp : sig
212212
extension_constructor ->
213213
expression ->
214214
expression
215-
val assert_ : ?loc:loc -> ?attrs:attrs -> expression -> expression
216215
val newtype : ?loc:loc -> ?attrs:attrs -> str -> expression -> expression
217216
val pack : ?loc:loc -> ?attrs:attrs -> module_expr -> expression
218217
val open_ :

compiler/ml/ast_helper0.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ module Exp = struct
175175
let override ?loc ?attrs a = mk ?loc ?attrs (Pexp_override a)
176176
let letmodule ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_letmodule (a, b, c))
177177
let letexception ?loc ?attrs a b = mk ?loc ?attrs (Pexp_letexception (a, b))
178-
let assert_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_assert a)
179178
let lazy_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_lazy a)
180179
let poly ?loc ?attrs a b = mk ?loc ?attrs (Pexp_poly (a, b))
181180
let newtype ?loc ?attrs a b = mk ?loc ?attrs (Pexp_newtype (a, b))

compiler/ml/ast_iterator.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ module E = struct
360360
| Pexp_letexception (cd, e) ->
361361
sub.extension_constructor sub cd;
362362
sub.expr sub e
363-
| Pexp_assert e -> sub.expr sub e
364363
| Pexp_newtype (_s, e) -> sub.expr sub e
365364
| Pexp_pack me -> sub.module_expr sub me
366365
| Pexp_open (_ovf, lid, e) ->

compiler/ml/ast_mapper.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ module E = struct
344344
letexception ~loc ~attrs
345345
(sub.extension_constructor sub cd)
346346
(sub.expr sub e)
347-
| Pexp_assert e -> assert_ ~loc ~attrs (sub.expr sub e)
348347
| Pexp_newtype (s, e) ->
349348
newtype ~loc ~attrs (map_loc sub s) (sub.expr sub e)
350349
| Pexp_pack me -> pack ~loc ~attrs (sub.module_expr sub me)

compiler/ml/ast_mapper_from0.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,6 @@ module E = struct
624624
letexception ~loc ~attrs
625625
(sub.extension_constructor sub cd)
626626
(sub.expr sub e)
627-
| Pexp_assert e -> assert_ ~loc ~attrs (sub.expr sub e)
628627
| Pexp_lazy _ -> failwith "Pexp_lazy is no longer present in ReScript"
629628
| Pexp_poly _ -> failwith "Pexp_poly is no longer present in ReScript"
630629
| Pexp_object () -> assert false

compiler/ml/ast_mapper_to0.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,6 @@ module E = struct
504504
letexception ~loc ~attrs
505505
(sub.extension_constructor sub cd)
506506
(sub.expr sub e)
507-
| Pexp_assert e -> assert_ ~loc ~attrs (sub.expr sub e)
508507
| Pexp_newtype (s, e) ->
509508
newtype ~loc ~attrs (map_loc sub s) (sub.expr sub e)
510509
| Pexp_pack me -> pack ~loc ~attrs (sub.module_expr sub me)

0 commit comments

Comments
 (0)