<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Excellent! Thank you very much!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 20, 2021 at 10:35 PM Mikael Karlsson <<a href="mailto:karlsson.rm@gmail.com">karlsson.rm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> How do you pass options (2nd argument) to a parse transform?<br>
<br>
The options are the compile options.<br>
If you need to pass custom options to the parse transform you can use -D :<br>
-- test_parse.erl<br>
-module(test_parse).<br>
-export([parse_transform/2]).<br>
<br>
parse_transform(Forms, Options) -><br>
io:format("Options: ~p~n", [Options]),<br>
Forms.<br>
<br>
-- testt.erl<br>
-module(testt).<br>
-export([test/0]).<br>
-compile({parse_transform, test_parse}).<br>
<br>
test() -> hoho.<br>
--<br>
~/work/erlang$ erlc -Dhejhopp -pa . testt.erl<br>
Options: [report_warnings,<br>
{d,hejhopp},<br>
report_errors,<br>
{cwd,"/home/mikael/work/erlang"},<br>
{outdir,"/home/mikael/work/erlang"}]<br>
</blockquote></div>