diff --git a/kiss/src/kiss/AsyncEmbeddedScript.hx b/kiss/src/kiss/AsyncEmbeddedScript.hx index e5212af5..2ecf8511 100644 --- a/kiss/src/kiss/AsyncEmbeddedScript.hx +++ b/kiss/src/kiss/AsyncEmbeddedScript.hx @@ -181,11 +181,13 @@ class AsyncEmbeddedScript { #if debug expr = macro { Prelude.print($v{exprString}); $expr; }; + expr = expr.expr.withMacroPosOf(nextExp); #end if (expr != null) { - commandList.push(macro function(self, cc) { + var c = macro function(self, cc) { $expr; - }); + }; + commandList.push(c.expr.withMacroPosOf(nextExp)); } // This return is essential for type unification of concat() and push() above... ugh. diff --git a/kiss/src/kiss/EmbeddedScript.hx b/kiss/src/kiss/EmbeddedScript.hx index 65cb441b..dd8de97a 100644 --- a/kiss/src/kiss/EmbeddedScript.hx +++ b/kiss/src/kiss/EmbeddedScript.hx @@ -71,9 +71,10 @@ class EmbeddedScript { var expr = Kiss.readerExpToHaxeExpr(nextExp, k); if (expr != null) { - commandList.push(macro function(self) { + var c = macro function(self) { $expr; - }); + }; + commandList.push(c.expr.withMacroPosOf(nextExp)); } // This return is essential for type unification of concat() and push() above... ugh.