KumiScript/interpreter/expression/StringExpression.cs

30 lines
647 B
C#
Raw Normal View History

2024-01-26 05:37:51 +00:00
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;
}
}
}