Skip to content

Commit 4a2abb4

Browse files
committed
move files around
1 parent 48aedb2 commit 4a2abb4

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

jscomp/core/typemod_hide.ml renamed to jscomp/syntax/typemod_hide.ml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,19 @@ let should_hide ( x : Typedtree.module_binding) =
2828
| [] -> false
2929
| ({txt = "internal.local";_},_) :: rest -> true
3030
| _ :: rest ->
31-
Ext_list.exists rest (fun (x,_) -> x.txt = "internal.local")
31+
Ext_list.exists rest (fun (x,_) -> x.txt = "internal.local")
32+
33+
let attrs : Parsetree.attributes =
34+
[{txt = "internal.local";loc = Location.none}, PStr []]
35+
36+
let check (x : Parsetree.structure_item) =
37+
match x.pstr_desc with
38+
| Pstr_eval _
39+
| Pstr_value _
40+
| Pstr_primitive _
41+
| Pstr_typext _
42+
| Pstr_exception _
43+
-> ()
44+
| _ ->
45+
Location.raise_errorf ~loc:x.pstr_loc
46+
"the structure is not supported in local extension"

0 commit comments

Comments
 (0)