Mozilla/mozilla/js/js2/java/JSString.java
rogerl%netscape.com 095914ec44 Switching to JSValue throughout. Implementing operators per base type.
git-svn-id: svn://10.0.0.236/trunk@32415 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-20 21:16:11 +00:00

26 lines
423 B
Java

class JSString extends JSValue {
JSString(String p)
{
s = p;
}
void eval(Environment theEnv)
{
theEnv.theStack.push(this);
}
void add(Environment theEnv)
{
JSString vR = theEnv.theStack.pop().toJSString();
theEnv.theStack.push(new JSString(s + vR.s));
}
JSString toJSString()
{
return this;
}
String s;
}