This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
19
unikernel/duniverse/ppxlib/astlib/clean.ml
Normal file
19
unikernel/duniverse/ppxlib/astlib/clean.ml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
let remove_ppxlib_migration_from_ast_mapper =
|
||||
let should_keep_attribute (a : Parsetree.attribute) =
|
||||
not (Stdlib0.String.is_prefix ~prefix:"ppxlib.migration" a.attr_name.txt)
|
||||
in
|
||||
let mapper =
|
||||
{
|
||||
Ast_mapper.default_mapper with
|
||||
attributes = (fun _ -> List.filter should_keep_attribute);
|
||||
}
|
||||
in
|
||||
mapper
|
||||
|
||||
let remove_migration_attributes_from_str =
|
||||
remove_ppxlib_migration_from_ast_mapper.structure
|
||||
remove_ppxlib_migration_from_ast_mapper
|
||||
|
||||
let remove_migration_attributes_from_sig =
|
||||
remove_ppxlib_migration_from_ast_mapper.signature
|
||||
remove_ppxlib_migration_from_ast_mapper
|
||||
Loading…
Add table
Add a link
Reference in a new issue