ExDNA.AST.Annotator (ExDNA v1.5.0)

Copy Markdown View Source

Pre-processes the AST to handle annotations like @no_clone true.

When @no_clone true immediately precedes a def/defp in a module body, both the annotation and the definition are stripped from the AST so the fingerprinter never sees them.

Summary

Functions

Remove any def/defp definitions that are preceded by @no_clone true.

Functions

strip_no_clone(ast)

@spec strip_no_clone(Macro.t()) :: Macro.t()

Remove any def/defp definitions that are preceded by @no_clone true.

The corresponding @no_clone true attribute nodes are also removed.