Main.hx 529 B

123456789101112131415161718192021222324252627282930
  1. #if macro
  2. import haxe.macro.Context;
  3. function init() {
  4. var here = (macro here).pos;
  5. Context.onAfterInitMacros(() -> {
  6. Context.warning("1", here);
  7. Context.onAfterInitMacros(() -> {
  8. Context.warning("2", here);
  9. });
  10. });
  11. Context.onGenerate((_) -> {
  12. Context.warning("3", here);
  13. Context.onGenerate((_) -> {
  14. Context.warning("4", here);
  15. });
  16. });
  17. Context.onAfterGenerate(() -> {
  18. Context.warning("5", here);
  19. Context.onAfterGenerate(() -> {
  20. Context.warning("6", here);
  21. });
  22. });
  23. }
  24. #end
  25. function main() {}