[erlang-questions] Stringification in erlang macros
Richard O'Keefe
ok@REDACTED
Thu Sep 25 03:32:58 CEST 2008
You could define assert using a parse transform
and get a parse tree, which you could then treat in
various ways. Stringising is so limiting because you
do not get to see what you most need to see, which is
the values of the variables. Given the file and line
number, you could discover the string, but not the
variables. With a parse transform, you could
turn
assert Guard end
into if Guard -> ok ; true -> ... file:line: V1=, ..., Vn= ... end
More information about the erlang-questions
mailing list