Esempio n. 1
0
 public BinaryExpression(MyExpression left, MyExpression right, string op, bool flag)
 {
     this.left  = left;
     this.right = right;
     operacija  = op;
     this.flag  = flag;
 }
Esempio n. 2
0
 public override string GetString(MyExpression exp) => (this.flag) ? string.Format("(" + this.left.GetString(exp) + this.operacija + this.right.GetString(exp) + ")")
                                                                   : string.Format(this.left.GetString(exp) + this.operacija + this.right.GetString(exp));
Esempio n. 3
0
 public abstract string GetString(MyExpression exp);
 public override string GetString(MyExpression exp) => string.Format(this.name);
 public override string GetString(MyExpression exp) => string.Format(this.value.ToString());