Skip to content

Commit ed6a395

Browse files
committed
remove unused code
1 parent 2c44b73 commit ed6a395

File tree

2 files changed

+1
-48
lines changed

2 files changed

+1
-48
lines changed

jscomp/syntax/ast_attributes.ml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -174,31 +174,6 @@ let process_derive_type (attrs : t) : derive_attr * t =
174174
st, attr::acc
175175
)
176176

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 *)
202177

203178

204179
(* duplicated [bs.uncurry] [bs.string] not allowed,
@@ -253,26 +228,6 @@ let iter_process_bs_string_as (attrs : t) : string option =
253228
) ;
254229
!st
255230

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
276231

277232
let has_bs_optional (attrs : t) : bool =
278233
Ext_list.exists attrs (fun

jscomp/syntax/ast_attributes.mli

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ val iter_process_bs_string_int_unwrap_uncurry :
7171
val iter_process_bs_string_as :
7272
t -> string option
7373

74-
val iter_process_bs_string_as_ast :
75-
t ->
76-
Parsetree.expression option
74+
7775

7876
val has_bs_optional :
7977
t -> bool

0 commit comments

Comments
 (0)