chainTo, exprTo
This commit is contained in:
@@ -35,10 +35,20 @@ class BindExt {
|
|||||||
return internalBindExpr(expr, listener);
|
return internalBindExpr(expr, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@:noUsing macro static public function exprTo(expr:Expr, target:Expr):Expr {
|
||||||
|
var type = Context.typeof(expr).toComplexType();
|
||||||
|
return internalBindExpr(expr, macro function (_, to:Null<$type>) $target = to);
|
||||||
|
}
|
||||||
|
|
||||||
@:noUsing macro static public function chain(expr:Expr, listener:Expr):Expr {
|
@:noUsing macro static public function chain(expr:Expr, listener:Expr):Expr {
|
||||||
return internalBindChain(expr, listener);
|
return internalBindChain(expr, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@:noUsing macro static public function chainTo(expr:Expr, target:Expr):Expr {
|
||||||
|
var type = Context.typeof(expr).toComplexType();
|
||||||
|
return internalBindChain(expr, macro function (_, to:Null<$type>) $target = to);
|
||||||
|
}
|
||||||
|
|
||||||
#if macro
|
#if macro
|
||||||
|
|
||||||
public static function internalBindChain(expr:Expr, listener:Expr):Expr {
|
public static function internalBindChain(expr:Expr, listener:Expr):Expr {
|
||||||
|
|||||||
Reference in New Issue
Block a user