Main3.hx 448 B

12345678910111213141516171819202122
  1. import haxe.macro.Context;
  2. class Main3 {
  3. static function init() {
  4. function defineType(name, kind) {
  5. Context.defineType({
  6. pack: [],
  7. name: name,
  8. pos: (macro 0).pos,
  9. kind: kind,
  10. fields: []
  11. });
  12. }
  13. defineType("lowercase", TDClass());
  14. defineType("0_class", TDClass());
  15. defineType("0_enum", TDEnum);
  16. defineType("0_struct", TDStructure);
  17. defineType("0_abstract", TDAbstract(TPath({pack: [], name: "Int"})));
  18. }
  19. }