Macro example?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Macro example?

Dion Amago
Hi,

I'm struggling to build a rather simple expression via macros.

Basically I want to *conditionally* place in code a static function call (via macros):

Foo.bar("someArg");

So somewhere else I'll call

MyMacros.maybeFoobar("someArg");

Which will replace the macro call with either the first expression, or nothing.

Could somebody show how to construct the 'Foo.bar("someArg");' expression in macro-speak?

Thanks in advance.

Dion

PS, I don't think I'm the only one who could use some more examples of macros.  Half the people on the list seem so excited about it, and the other half are caught up in the enthusiasm, but bewildered
as to what exactly everyone else is excited about :-)


--
haXe - an open source web programming language
http://haxe.org