public void SetStep(AstExpressionOperand operand) { if (!TrySetStep(operand)) { throw new InternalErrorException("Step Expression Operand is already set or null."); } }
public bool Add(AstExpressionOperand op) { if (_rhs is null) { op.SetParent(this); _rhs = op; return(true); } if (_lhs is null && !IsOperator(AstExpressionOperator.MaskUnary)) { op.SetParent(this); _lhs = op; return(true); } return(false); }
public bool TrySetStep(AstExpressionOperand operand) => this.SafeSetParent(ref _step, operand);
public bool TrySetEnd(AstExpressionOperand operand) => base.TrySetRHS(operand);
public bool TrySetBegin(AstExpressionOperand operand) => base.TrySetLHS(operand);
public AstExpression(AstExpressionOperand operand) : base(AstNodeKind.Expression) { TrySetRHS(operand); }
protected bool TrySetRHS(AstExpressionOperand operand) => this.SafeSetParent(ref _rhs, operand);