Macro.hx 306 B

1234567891011121314
  1. class Macro {
  2. static function doStuff() {
  3. haxe.macro.Context.onAfterInitMacros(() -> {
  4. switch (haxe.macro.Context.getType("B")) {
  5. case TInst(_.get() => cl, _):
  6. for (field in cl.fields.get()) {
  7. trace(field.name, field.expr()?.pos);
  8. }
  9. default:
  10. throw false;
  11. }
  12. });
  13. }
  14. }