123456789101112131415161718192021222324252627 |
- import haxe.macro.Context;
- import haxe.macro.Expr;
- class Macro {
- static function build() {
- var pos = Context.currentPos();
- Context.defineModule(Context.getLocalModule(), [{
- pos: pos,
- pack: [],
- name: "A",
- kind: TDAbstract(macro : Int),
- fields: [
- {
- pos: pos,
- name: "new",
- access: [APublic],
- kind: FFun({
- args: [],
- ret: null,
- expr: macro this = 1,
- })
- }
- ]
- }]);
- return macro : A;
- }
- }
|