And just to be clear, by "current scope" here I mean the scope of where the code from this macro is getting "pasted", not the macro scope.
On Tuesday, September 27, 2016 at 11:28:40 AM UTC+2, Marius Millea wrote: > > Hi, is there a way to "eval" something in the current scope? My problem is > the following, I've written a macro that, inside the returned expression, > builds an expression which I need to eval. It looks like this, > > macro foo() > quote > ex = ... > eval_in_current_scope(ex) > end > end > > Now, you might say I'm using macros wrong and I should just be doing, > > macro foo() > ex = ... > end > > > but in this case when I build "ex", it needs to occur at runtime since it > depends on some things only available then. So is there any way to go about > this? Thanks. > >