Commit Graph

7 Commits

Author SHA1 Message Date
Ulf Wiger
895a157dc9 improved error reporting, return/2, format_exception/2 2012-12-18 15:50:17 +01:00
Ulf Wiger
38b2183a9e added LC form to codegen:gen_function/2 2012-12-14 22:57:47 +01:00
Klas Johansson
1ec65427e4 Inject an abstract form when '$form' is seen
'$form' works much like '$var', only that it makes it possible to
inject ready-made abstract forms into the generated
functions/expressions.  The following call:

  gen(Name, F) ->
     codegen:gen_function(Name, fun(X) -> X =:= {'$form',F} end).

generates the following if called like this: gen(is_foo, {atom,0,foo})

  is_foo(X) ->
     X =:= foo.
2010-10-26 21:23:11 +02:00
Ulf Wiger
488dc61f56 added codegen: gen_functions/1, expr/1 2010-09-05 14:32:59 +02:00
Ulf Wiger
0f2fc09ab2 edoc for parse_trans_codegen 2010-07-02 06:39:05 -04:00
Ulf Wiger
6e34855ffb codegen variable substitution 2010-06-22 16:16:11 +02:00
Ulf Wiger
c318a5fb47 first draft of parse_trans_codegen.erl 2010-06-22 12:37:08 +02:00