some toStrings

This commit is contained in:
TopchetoEU 2024-12-10 01:10:14 +02:00
parent 8d7939d85a
commit 4e18c76bb1
Signed by: topchetoeu
GPG Key ID: 6531B8583E5F6ED4
2 changed files with 7 additions and 0 deletions

View File

@ -44,6 +44,9 @@ public final class StringValue extends PrimitiveValue {
else if (other instanceof StringValue val) return value.length() == val.value.length() && value.equals(val.value);
else return false;
}
@Override public String toString() {
return value;
}
@Override public ObjectValue getPrototype(Environment env) { return env.get(STRING_PROTO); }

View File

@ -31,6 +31,10 @@ public final class VoidValue extends PrimitiveValue {
return Arrays.asList(name);
}
@Override public String toString() {
return name;
}
public VoidValue(String name, String type) {
this.name = name;
this.type = type;