File tree 1 file changed +20
-19
lines changed
1 file changed +20
-19
lines changed Original file line number Diff line number Diff line change @@ -578,28 +578,29 @@ let rec structure_mapper ~await_context (self : mapper) (stru : Ast_structure.t)
578
578
vbs
579
579
|> List. filter_map (fun ({pvb_expr} : Parsetree.value_binding ) ->
580
580
match pvb_expr.pexp_desc with
581
- | Pexp_letmodule (_, ({pmod_attributes} as me), _)
581
+ | Pexp_letmodule
582
+ ( _,
583
+ ({pmod_desc = Pmod_ident {txt; loc}; pmod_attributes} as
584
+ me),
585
+ _ )
582
586
when Res_parsetree_viewer. hasAwaitAttribute pmod_attributes
583
587
-> (
584
- match me.pmod_desc with
585
- | Pmod_ident {txt; loc} -> (
586
- let safe_module_type_name = local_module_type_name txt in
587
- let has_local_module_name =
588
- Hashtbl. find_opt ! await_context safe_module_type_name
589
- in
588
+ let safe_module_type_name = local_module_type_name txt in
589
+ let has_local_module_name =
590
+ Hashtbl. find_opt ! await_context safe_module_type_name
591
+ in
590
592
591
- match has_local_module_name with
592
- | Some _ -> None
593
- | None ->
594
- Hashtbl. add ! await_context safe_module_type_name
595
- safe_module_type_name;
596
- Some
597
- Ast_helper. (
598
- Str. modtype ~loc
599
- (Mtd. mk ~loc
600
- {txt = safe_module_type_name; loc}
601
- ~typ: (Mty. typeof_ ~loc me))))
602
- | _ -> None )
593
+ match has_local_module_name with
594
+ | Some _ -> None
595
+ | None ->
596
+ Hashtbl. add ! await_context safe_module_type_name
597
+ safe_module_type_name;
598
+ Some
599
+ Ast_helper. (
600
+ Str. modtype ~loc
601
+ (Mtd. mk ~loc
602
+ {txt = safe_module_type_name; loc}
603
+ ~typ: (Mty. typeof_ ~loc me))))
603
604
| _ -> None )
604
605
in
605
606
You can’t perform that action at this time.
0 commit comments