File tree Expand file tree Collapse file tree 4 files changed +2
-20
lines changed Expand file tree Collapse file tree 4 files changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ let fn_mk = "fn_mk"
62
62
(* let js_fn_runmethod = "js_fn_runmethod"*)
63
63
64
64
65
- let bs_deriving_dot = " bs.deriving. "
65
+
66
66
67
67
68
68
(* * nodejs *)
Original file line number Diff line number Diff line change @@ -65,15 +65,7 @@ let gen_signature
65
65
(Ast_payload. table_dispatch ! derive_table action).signature_gen
66
66
tdcls explict_nonrec)
67
67
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)
75
68
76
- | Some f -> f typ
77
69
78
70
open Ast_helper
79
71
let gen_structure_signature
Original file line number Diff line number Diff line change @@ -52,12 +52,6 @@ val gen_signature:
52
52
Ast_signature .t
53
53
54
54
55
- val gen_expression :
56
- string Asttypes .loc ->
57
- Parsetree .core_type ->
58
- Parsetree .expression
59
-
60
-
61
55
62
56
val gen_structure_signature :
63
57
Location .t ->
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ open Ast_helper
28
28
29
29
30
30
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 ) =
32
32
begin match txt with
33
33
| "bs.raw" | "raw" ->
34
34
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)
141
141
| _ -> Location. raise_errorf ~loc " Expect an expression here"
142
142
end
143
143
| _ ->
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
- | _ ->
148
144
e (* For an unknown extension, we don't really need to process further*)
149
145
(* Exp.extension ~loc ~attrs:e.pexp_attributes (
150
146
self.extension self extension) *)
You can’t perform that action at this time.
0 commit comments