CanonSharp/CanonSharp.Pascal/SyntaxTree/UnaryOperatorNode.cs
jackfiled cf19f8197e feat: Grammar Parser (#3)
Reviewed-on: https://git.bupt-hpc.cn/jackfiled/CanonSharp/pulls/3
Co-authored-by: jackfiled <xcrenchangjun@outlook.com>
Co-committed-by: jackfiled <xcrenchangjun@outlook.com>
2024-08-18 12:01:27 +08:00

18 lines
398 B
C#

namespace CanonSharp.Pascal.SyntaxTree;
public enum UnaryOperatorType
{
Plus,
Minus,
Not
}
public sealed class UnaryOperatorNode(UnaryOperatorType operatorType, SyntaxNodeBase node) : SyntaxNodeBase
{
public override SyntaxNodeType NodeType => SyntaxNodeType.UnaryOperator;
public UnaryOperatorType OperatorType => operatorType;
public SyntaxNodeBase Node => node;
}