Path: redb-route/redb.Route/Expressions/Ast/PostfixOperationNode.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route/Expressions/Ast/PostfixOperationNode.cs
----
using System;
using redb.Route.Abstractions;
namespace redb.Route.Expressions.Ast;
///
/// AST node for postfix operations (e.g. x++, x--).
/// Returns the original value before the increment/decrement is applied.
///
public class PostfixOperationNode : AstNode
{
///
/// Gets the operand (the expression being incremented or decremented).
///
public AstNode Operand { get; }
///
/// Gets the postfix operator ("++" or "--").
///
public string Operator { get; }
///
/// Initializes a new instance of the class.
///
/// The operand node.
/// The postfix operator string ("++" or "--").
/// Thrown when is null.
public PostfixOperationNode(AstNode operand, string @operator)
{
Operand = operand ?? throw new ArgumentNullException(nameof(operand));
Operator = @operator;
}
///
public override string ToString()
{
return $"({Operand}){Operator}";
}
}