KumiScript/parser/ParenthesisToken.cs
2024-01-25 23:37:51 -06:00

25 lines
No EOL
531 B
C#

using KumiScript.Interpreter;
namespace KumiScript.Reader
{
public class ParenthesisToken : Token
{
public readonly bool _leftParen;
public ParenthesisToken(bool lp)
{
_leftParen = lp;
}
public override Expression Accept(ITokenVisitor tokenVisitor)
{
return tokenVisitor.VisitParen(this);
}
public override string GetValue()
{
if (_leftParen)
return "(";
return ")";
}
}
}