in debug, AsyncEmbeddedScript traces the kiss expression of each command before running it
This commit is contained in:
@@ -62,8 +62,13 @@ class AsyncEmbeddedScript {
|
|||||||
scriptFile = Path.join([loadingDirectory, scriptFile]);
|
scriptFile = Path.join([loadingDirectory, scriptFile]);
|
||||||
k.fieldList = [];
|
k.fieldList = [];
|
||||||
Reader.readAndProcess(Stream.fromFile(scriptFile), k, (nextExp) -> {
|
Reader.readAndProcess(Stream.fromFile(scriptFile), k, (nextExp) -> {
|
||||||
|
var exprString = Reader.toString(nextExp.def);
|
||||||
var expr = Kiss.readerExpToHaxeExpr(nextExp, k);
|
var expr = Kiss.readerExpToHaxeExpr(nextExp, k);
|
||||||
|
|
||||||
|
#if debug
|
||||||
|
expr = macro { trace($v{exprString}); $expr; };
|
||||||
|
#end
|
||||||
|
|
||||||
if (expr != null) {
|
if (expr != null) {
|
||||||
commandList.push(macro function(self, cc) {
|
commandList.push(macro function(self, cc) {
|
||||||
$expr;
|
$expr;
|
||||||
|
Reference in New Issue
Block a user