Skip to content

Commit d68cd16

Browse files
committed
remove experimental [%bs.deriving.sexp: t] support
1 parent 26b3e49 commit d68cd16

File tree

4 files changed

+2
-20
lines changed

4 files changed

+2
-20
lines changed

jscomp/ext/literals.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ let fn_mk = "fn_mk"
6262
(*let js_fn_runmethod = "js_fn_runmethod"*)
6363

6464

65-
let bs_deriving_dot = "bs.deriving."
65+
6666

6767

6868
(** nodejs *)

jscomp/syntax/ast_derive.ml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,7 @@ let gen_signature
6565
(Ast_payload.table_dispatch !derive_table action).signature_gen
6666
tdcls explict_nonrec)
6767

68-
(** used for cases like [%sexp] *)
69-
let gen_expression ({Asttypes.txt ; loc}) typ =
70-
let txt = Ext_string.tail_from txt (String.length Literals.bs_deriving_dot) in
71-
match (Ast_payload.table_dispatch !derive_table
72-
({txt ; loc}, None)).expression_gen with
73-
| None ->
74-
Bs_syntaxerr.err loc (Unregistered txt)
7568

76-
| Some f -> f typ
7769

7870
open Ast_helper
7971
let gen_structure_signature

jscomp/syntax/ast_derive.mli

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ val gen_signature:
5252
Ast_signature.t
5353

5454

55-
val gen_expression :
56-
string Asttypes.loc ->
57-
Parsetree.core_type ->
58-
Parsetree.expression
59-
60-
6155

6256
val gen_structure_signature :
6357
Location.t ->

jscomp/syntax/ast_exp_extension.ml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ open Ast_helper
2828

2929

3030
let handle_extension record_as_js_object e (self : Bs_ast_mapper.mapper)
31-
(({txt ; loc} as lid , payload) : Parsetree.extension) =
31+
(({txt ; loc} , payload) : Parsetree.extension) =
3232
begin match txt with
3333
| "bs.raw" | "raw" ->
3434
Ast_exp_handle_external.handle_raw ~kind:Raw_exp loc payload
@@ -141,10 +141,6 @@ let handle_extension record_as_js_object e (self : Bs_ast_mapper.mapper)
141141
| _ -> Location.raise_errorf ~loc "Expect an expression here"
142142
end
143143
| _ ->
144-
match payload with
145-
| PTyp typ when Ext_string.starts_with txt Literals.bs_deriving_dot ->
146-
self.expr self (Ast_derive.gen_expression lid typ)
147-
| _ ->
148144
e (* For an unknown extension, we don't really need to process further*)
149145
(* Exp.extension ~loc ~attrs:e.pexp_attributes (
150146
self.extension self extension) *)

0 commit comments

Comments
 (0)