[erlang-questions] compile module from string, containing macro definitions
Tue Mar 13 22:09:11 CET 2007
Mats Cronqvist wrote :
> > My suggestion was to improve the ram_file_server, so that you could
> > take a string representation of code, open it as a ram file, and
> > then use any tool that can operate on a file descriptor (which
> > epp_dodger can, but epp can't).
> improving the ram_file_server might well be useful, but surely the
> preprocessor should accept a string as input? actually, i think it
> should accept a token list too.
For what it's worth, I agree with Mats. I am trying to work on a
development environment for Erlang, and being able to compile and
pre-process a string directly would be very convenient. What we really
need is to compile a string to forms (we need the intermediate
representation, and we can already compile from forms onwards). The
ram_file_server solution would achieve the same thing (if all tools
would operate on a file descriptor) but is not as simple.
More information about the erlang-questions