Main.hx 288 B

123456789101112131415
  1. class Main {
  2. static function main() {
  3. var foo = {"a": 1, "b": 1, "c": 1};
  4. test();
  5. trace($i{"wtf"});
  6. }
  7. static macro function test() {
  8. var options:Array<haxe.macro.Expr> = [
  9. for (s in ["a", "b", "c"])
  10. macro @:pos(pos) $p{["foo", s]}
  11. ];
  12. return macro $b{options};
  13. }
  14. }