Authors: Serge Aleynikov (saleyn(at)gmail(dot)com).
Erlang pipeline parse transform
When using this as a parse transform, include the{parse_transform,erlpipe}
compiler option. In this case the following code transforms will be done:
test1(A) -> [A] / fun1 / mod:fun2 / fun3. test2(A,B) -> [A,B] / fun4 / fun5() / io:format("~p\n", [_]).will be transformed to:
test1(A) -> fun3(mod:fun2(fun1(A))). test2(A,B) -> io:format("~p\n", [fun5(fun4(A,B))]).For debugging the AST of the resulting transform, use
-Derlpipe_debug
command-line option.
parse_transform/2 | parse_transform entry point. |
parse_transform(AST, Options) -> any()
parse_transform entry point