ExDNA.AST.PipeNormalizer (ExDNA v1.5.2)

Copy Markdown View Source

Normalizes pipe operators to nested function calls.

x |> foo() |> bar(1) becomes bar(foo(x), 1).

This ensures that stylistic choices between pipe chains and nested calls don't prevent clone detection.

Summary

Functions

Convert all pipe expressions in an AST to nested function calls.

Functions

normalize(ast)

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

Convert all pipe expressions in an AST to nested function calls.