M
Martin C. Martin
Hi,
In Lisp, it's easy to get the parse tree of an expression, and to
manipulate those parse trees. That means Lisp code tends to use macros,
i.e. lisp functions whose return values are parse trees. These macros
are evaluated at compile time and inserted into the place where the
macro call appears.
Is there anything equivalent in Ruby? Is there a way in Ruby to get the
parse tree of, say, x + y? Is there a way to execute parse trees?
Best,
Martin
In Lisp, it's easy to get the parse tree of an expression, and to
manipulate those parse trees. That means Lisp code tends to use macros,
i.e. lisp functions whose return values are parse trees. These macros
are evaluated at compile time and inserted into the place where the
macro call appears.
Is there anything equivalent in Ruby? Is there a way in Ruby to get the
parse tree of, say, x + y? Is there a way to execute parse trees?
Best,
Martin