30 lines
No EOL
647 B
C#
30 lines
No EOL
647 B
C#
namespace KumiScript.Interpreter
|
|
{
|
|
public class StringExpression : Expression
|
|
{
|
|
string _value;
|
|
public StringExpression(string str)
|
|
{
|
|
_value = str;
|
|
}
|
|
|
|
public override bool Equals(Expression expr)
|
|
{
|
|
StringExpression? se = expr as StringExpression;
|
|
if (se is null)
|
|
return false;
|
|
|
|
return _value == se._value;
|
|
}
|
|
|
|
public override Expression Eval(Environment env)
|
|
{
|
|
return this;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return _value;
|
|
}
|
|
}
|
|
} |