From 4111dbf5c4d2035a83d5271a6196f0be1811cd59 Mon Sep 17 00:00:00 2001 From: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com> Date: Sat, 25 Nov 2023 18:41:47 +0200 Subject: [PATCH] fix: functions now print their name when stringified --- src/me/topchetoeu/jscript/engine/values/FunctionValue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/me/topchetoeu/jscript/engine/values/FunctionValue.java b/src/me/topchetoeu/jscript/engine/values/FunctionValue.java index 1a19925..01eb281 100644 --- a/src/me/topchetoeu/jscript/engine/values/FunctionValue.java +++ b/src/me/topchetoeu/jscript/engine/values/FunctionValue.java @@ -11,7 +11,7 @@ public abstract class FunctionValue extends ObjectValue { @Override public String toString() { - return "function(...) { ...}"; + return "function %s(...)".formatted(name); } public abstract Object call(Context ctx, Object thisArg, Object ...args);