more using, rename

This commit is contained in:
Dima Granetchi
2015-01-09 03:06:24 +02:00
parent 8e62ede9d7
commit 2520a65850
7 changed files with 45 additions and 38 deletions
+7 -6
View File
@@ -5,25 +5,26 @@ import haxe.macro.Context;
import bindx.macro.BindExtMacros;
using haxe.macro.Tools;
using bindx.macro.MacroUtils;
@:access(bindx.macro.BindxExtMacro)
class BindExt {
@:noUsing macro static public function expr<T>(expr:ExprOf<T>, listener:ExprOf<Null<T>->Null<T>->Void>):ExprOf<Void->Void> {
return BindxExtMacro.internalBindExpr(expr, listener);
return BindxExtMacro.bindExpr(expr, listener);
}
@:noUsing macro static public function exprTo<T>(expr:ExprOf<T>, target:ExprOf<T>):ExprOf<Void->Void> {
var type = Context.typeof(expr).toComplexType();
return BindxExtMacro.internalBindExpr(expr, macro function (_, to:Null<$type>) $target = to);
var type = expr.getComplexType();
return BindxExtMacro.bindExpr(expr, macro function (_, to:Null<$type>) $target = to);
}
@:noUsing macro static public function chain<T>(expr:ExprOf<T>, listener:Expr):ExprOf<Void->Void> {
return BindxExtMacro.internalBindChain(expr, listener);
return BindxExtMacro.bindChain(expr, listener);
}
@:noUsing macro static public function chainTo<T>(expr:ExprOf<T>, target:ExprOf<T>):ExprOf<Void->Void> {
var type = Context.typeof(expr).toComplexType();
return BindxExtMacro.internalBindChain(expr, macro function (_, to:Null<$type>) $target = to);
var type = expr.getComplexType();
return BindxExtMacro.bindChain(expr, macro function (_, to:Null<$type>) $target = to);
}
}