public BinaryExpression(MyExpression left, MyExpression right, string op, bool flag) { this.left = left; this.right = right; operacija = op; this.flag = flag; }
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));
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());