allow customization of top level async end point

This commit is contained in:
Nicolas Cannasse
2019-10-07 10:57:53 +02:00
parent d98073dc33
commit 0daee20545
+6 -2
View File
@@ -75,12 +75,16 @@ class Async {
return a.build(e, topLevelSync);
}
public dynamic function getTopLevelEnd() {
return ignore();
}
public function build( e : Expr, topLevelSync = false ) {
if( topLevelSync ) {
return buildSync(e,null);
} else {
var nothing = ignore();
return toCps(e, nothing, nothing);
var end = getTopLevelEnd();
return toCps(e, end, end);
}
}