mirror of
https://github.com/valitydev/parse_trans.git
synced 2024-11-06 08:35:17 +00:00
16 lines
465 B
Erlang
16 lines
465 B
Erlang
-module(ex_gproc_send_xform).
|
|
-export([parse_transform/2]).
|
|
|
|
|
|
parse_transform(Forms, _Options) ->
|
|
parse_trans:light_transform(fun do_transform/1, Forms).
|
|
|
|
do_transform({'op', L, '!', Lhs, Rhs}) ->
|
|
[NewLhs] = parse_trans:light_transform(fun do_transform/1, [Lhs]),
|
|
[NewRhs] = parse_trans:light_transform(fun do_transform/1, [Rhs]),
|
|
{call, L, {remote, L, {atom, L, gproc}, {atom, L, send}},
|
|
[NewLhs, NewRhs]};
|
|
do_transform(_) ->
|
|
continue.
|
|
|