KumiScript/interpreter/expression/StringExpression.cs
2024-01-25 23:37:51 -06:00

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;
}
}
}