File tree Expand file tree Collapse file tree 2 files changed +1
-48
lines changed Expand file tree Collapse file tree 2 files changed +1
-48
lines changed Original file line number Diff line number Diff line change @@ -174,31 +174,6 @@ let process_derive_type (attrs : t) : derive_attr * t =
174
174
st, attr::acc
175
175
)
176
176
177
- (* let iter_process_derive_type (attrs : t) =
178
- let st = ref {explict_nonrec = false; bs_deriving = None } in
179
- Ext_list.iter attrs
180
- (fun ({txt ; loc}, payload as attr) ->
181
- match txt with
182
- | "bs.deriving"
183
- ->
184
- let ost = !st in
185
- (match ost with
186
- | {bs_deriving = None } ->
187
- Bs_ast_invariant.mark_used_bs_attribute attr ;
188
- st :=
189
- {ost with
190
- bs_deriving = Some
191
- (Ast_payload.ident_or_record_as_config loc payload)}
192
- | {bs_deriving = Some _} ->
193
- Bs_syntaxerr.err loc Duplicated_bs_deriving)
194
-
195
- | "nonrec" ->
196
- st :=
197
- { !st with explict_nonrec = true }
198
- (* non bs attribute, no need to mark its use *)
199
- | _ -> ()
200
- ) ;
201
- !st *)
202
177
203
178
204
179
(* duplicated [bs.uncurry] [bs.string] not allowed,
@@ -253,26 +228,6 @@ let iter_process_bs_string_as (attrs : t) : string option =
253
228
) ;
254
229
! st
255
230
256
- let iter_process_bs_string_as_ast (attrs : t ) : Parsetree.expression option =
257
- let st = ref None in
258
- Ext_list. iter attrs
259
- (fun
260
- (({txt ; loc} , payload ) as attr ) ->
261
- match txt with
262
- | " bs.as"
263
- ->
264
- if ! st = None then
265
- match Ast_payload. is_single_string_as_ast payload with
266
- | None ->
267
- Bs_syntaxerr. err loc Expect_string_literal
268
- | Some _ as v ->
269
- Bs_ast_invariant. mark_used_bs_attribute attr ;
270
- st:= v
271
- else
272
- Bs_syntaxerr. err loc Duplicated_bs_as
273
- | _ -> ()
274
- ) ;
275
- ! st
276
231
277
232
let has_bs_optional (attrs : t ) : bool =
278
233
Ext_list. exists attrs (fun
Original file line number Diff line number Diff line change @@ -71,9 +71,7 @@ val iter_process_bs_string_int_unwrap_uncurry :
71
71
val iter_process_bs_string_as :
72
72
t -> string option
73
73
74
- val iter_process_bs_string_as_ast :
75
- t ->
76
- Parsetree .expression option
74
+
77
75
78
76
val has_bs_optional :
79
77
t -> bool
You can’t perform that action at this time.
0 commit comments