fix: functions now print their name when stringified

This commit is contained in:
TopchetoEU 2023-11-25 18:41:47 +02:00
parent 1666682dc2
commit 4111dbf5c4
Signed by: topchetoeu
GPG Key ID: 6531B8583E5F6ED4

View File

@ -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);