25 lines
No EOL
531 B
C#
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 ")";
|
|
}
|
|
}
|
|
} |