Created
July 20, 2013 13:14
-
-
Save deltaluca/6044969 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> haxe -x Main | |
Lambdas.hx:11: [{ kind => FFun({ args => [], expr => { expr => EBlock([]), pos => #pos(Main.hx:2: lines 2-9) }, params => [], ret => null }), meta => [], name => main, doc => null, pos => #pos(Main.hx:2: lines 2-9), access => [AStatic] }] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import haxe.macro.Expr; | |
import haxe.macro.ExprTools; | |
import haxe.macro.Context; | |
@:autoBuild(ShortLambdas.run()) interface Lambdas {} | |
class ShortLambdas { | |
public static function run() { | |
var fields = Context.getBuildFields(); | |
// perform AST transforms. | |
// trace fields for now to check it's running | |
trace(fields); | |
return fields; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main implements Lambdas { | |
static function main() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment