From 4a8b2690aabda12e576d1c127e79b5208adfd9af Mon Sep 17 00:00:00 2001 From: ncannasse Date: Thu, 23 Nov 2017 16:14:59 +0100 Subject: [PATCH] fixed trace() with multiple arguments --- hscript/Interp.hx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hscript/Interp.hx b/hscript/Interp.hx index 5d64386..1058acd 100644 --- a/hscript/Interp.hx +++ b/hscript/Interp.hx @@ -61,7 +61,12 @@ class Interp { variables.set("null",null); variables.set("true",true); variables.set("false",false); - variables.set("trace",function(e) haxe.Log.trace(Std.string(e), posInfos())); + variables.set("trace", Reflect.makeVarArgs(function(el) { + var inf = posInfos(); + var v = el.shift(); + if( el.length > 0 ) inf.customParams = el; + haxe.Log.trace(Std.string(v), inf); + })); initOps(); }