Example #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;
 }
Example #2
0
 private bool needsParenthesis(Rollable child)
 => (child as BinaryOperator)?.OperatorPrecedence < this.OperatorPrecedence;
Example #3
0
 public abstract Rollable With(Rollable left, Rollable right);
Example #4
0
 public Rollable Times(Rollable right) => this * right;
Example #5
0
 public Rollable Minus(Rollable right) => this - right;
Example #6
0
 public Rollable Plus(Rollable right) => this + right;