fix: symbols not stringified properly
This commit is contained in:
parent
611be55bbb
commit
28679f44d5
@ -1,6 +1,9 @@
|
|||||||
package me.topchetoeu.jscript.runtime.values.primitives;
|
package me.topchetoeu.jscript.runtime.values.primitives;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.environment.Environment;
|
import me.topchetoeu.jscript.common.environment.Environment;
|
||||||
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
@ -34,6 +37,11 @@ public final class SymbolValue extends PrimitiveValue {
|
|||||||
else return "Symbol(" + value + ")";
|
else return "Symbol(" + value + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> toReadableLines(Environment env, HashSet<ObjectValue> passed) {
|
||||||
|
return Arrays.asList(toString());
|
||||||
|
}
|
||||||
|
|
||||||
public SymbolValue(String value) {
|
public SymbolValue(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user