Reification Escaping

43 views
Skip to first unread message

gsun

unread,
Nov 1, 2013, 5:29:58 AM11/1/13
to haxe...@googlegroups.com

Could we use reification escaping with class definition in macro mode to inject the value of variable name or class name?
for example, use a var to define the class name X, or static variable name IDLE.(we can do this without reification.)

macro class X {  
                  public static var IDLE;
                  public static function new() {} }

thanks.

Juraj Kirchheim

unread,
Nov 1, 2013, 5:46:04 AM11/1/13
to haxe...@googlegroups.com
I'm pretty sure $IDLE will work and with a bit of luck $X will too. If
not, consider opening an issue.

Regards,
Juraj
> --
> To post to this group haxe...@googlegroups.com
> http://groups.google.com/group/haxelang?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Haxe" group.
> For more options, visit https://groups.google.com/groups/opt_out.

gsun

unread,
Nov 1, 2013, 8:13:52 PM11/1/13
to haxe...@googlegroups.com
both can't work now.

I am not sure if this is one issue or correct behavior for haxe.

在 2013年11月1日星期五UTC+8下午5时46分04秒,back2dos写道:

Juraj Kirchheim

unread,
Nov 1, 2013, 9:02:33 PM11/1/13
to haxe...@googlegroups.com
Since at expression level `var $foo = value` and `{ $foo : value }`
will work, I think this would only be consistent behavior.
Reply all
Reply to author
Forward
0 new messages