コード例 #1
0
 public void SetStep(AstExpressionOperand operand)
 {
     if (!TrySetStep(operand))
     {
         throw new InternalErrorException("Step Expression Operand is already set or null.");
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public bool TrySetStep(AstExpressionOperand operand)
 => this.SafeSetParent(ref _step, operand);
コード例 #4
0
 public bool TrySetEnd(AstExpressionOperand operand)
 => base.TrySetRHS(operand);
コード例 #5
0
 public bool TrySetBegin(AstExpressionOperand operand)
 => base.TrySetLHS(operand);
コード例 #6
0
 public AstExpression(AstExpressionOperand operand)
     : base(AstNodeKind.Expression)
 {
     TrySetRHS(operand);
 }
コード例 #7
0
 protected bool TrySetRHS(AstExpressionOperand operand)
 => this.SafeSetParent(ref _rhs, operand);