EmbeddedScript and AsyncEmbeddedScript use _try() when building
This commit is contained in:
@@ -61,6 +61,7 @@ class AsyncEmbeddedScript {
|
|||||||
|
|
||||||
scriptFile = Path.join([loadingDirectory, scriptFile]);
|
scriptFile = Path.join([loadingDirectory, scriptFile]);
|
||||||
k.fieldList = [];
|
k.fieldList = [];
|
||||||
|
Kiss._try(() -> {
|
||||||
Reader.readAndProcess(Stream.fromFile(scriptFile), k, (nextExp) -> {
|
Reader.readAndProcess(Stream.fromFile(scriptFile), k, (nextExp) -> {
|
||||||
var exprString = Reader.toString(nextExp.def);
|
var exprString = Reader.toString(nextExp.def);
|
||||||
var expr = Kiss.readerExpToHaxeExpr(nextExp, k);
|
var expr = Kiss.readerExpToHaxeExpr(nextExp, k);
|
||||||
@@ -78,6 +79,8 @@ class AsyncEmbeddedScript {
|
|||||||
// This return is essential for type unification of concat() and push() above... ugh.
|
// This return is essential for type unification of concat() and push() above... ugh.
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
null;
|
||||||
|
});
|
||||||
|
|
||||||
classFields = classFields.concat(k.fieldList);
|
classFields = classFields.concat(k.fieldList);
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class EmbeddedScript {
|
|||||||
classFields = classFields.concat(Kiss.build(dslFile, k));
|
classFields = classFields.concat(Kiss.build(dslFile, k));
|
||||||
scriptFile = Path.join([loadingDirectory, scriptFile]);
|
scriptFile = Path.join([loadingDirectory, scriptFile]);
|
||||||
|
|
||||||
|
Kiss._try(() -> {
|
||||||
Reader.readAndProcess(Stream.fromFile(scriptFile), k, (nextExp) -> {
|
Reader.readAndProcess(Stream.fromFile(scriptFile), k, (nextExp) -> {
|
||||||
var expr = Kiss.readerExpToHaxeExpr(nextExp, k);
|
var expr = Kiss.readerExpToHaxeExpr(nextExp, k);
|
||||||
|
|
||||||
@@ -78,6 +79,8 @@ class EmbeddedScript {
|
|||||||
// i.e. knot declarations need to end the previous knot, and BELOW that set a label for the new one, then increment the read count
|
// i.e. knot declarations need to end the previous knot, and BELOW that set a label for the new one, then increment the read count
|
||||||
// TODO test await
|
// TODO test await
|
||||||
});
|
});
|
||||||
|
null;
|
||||||
|
});
|
||||||
|
|
||||||
classFields.push({
|
classFields.push({
|
||||||
pos: PositionTools.make({
|
pos: PositionTools.make({
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class Kiss {
|
|||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function _try<T>(operation:() -> T):Null<T> {
|
public static function _try<T>(operation:() -> T):Null<T> {
|
||||||
#if !macrotest
|
#if !macrotest
|
||||||
try {
|
try {
|
||||||
#end
|
#end
|
||||||
|
|||||||
Reference in New Issue
Block a user