Exemplo n.º 1
0
 protected BinaryOperator(Rollable left, Rollable right)
 {
     if (left == null)
     {
         throw new ArgumentNullException(nameof(left));
     }
     if (right == null)
     {
         throw new ArgumentNullException(nameof(right));
     }
     this.Left  = left;
     this.Right = right;
 }
Exemplo n.º 2
0
 private bool needsParenthesis(Rollable child)
 => (child as BinaryOperator)?.OperatorPrecedence < this.OperatorPrecedence;
Exemplo n.º 3
0
 public abstract Rollable With(Rollable left, Rollable right);
Exemplo n.º 4
0
 public Rollable Times(Rollable right) => this * right;
Exemplo n.º 5
0
 public Rollable Minus(Rollable right) => this - right;
Exemplo n.º 6
0
 public Rollable Plus(Rollable right) => this + right;