public static PassiveExpression Build(params object[] objects) { PassiveExpression result = new PassiveExpression(); // flatten expressions, if needed foreach (object obj in objects) { if (obj is PassiveExpression) { foreach (object symbol in (PassiveExpression)obj) result.Add(symbol); } else result.Add(obj); } return result; }
public static PassiveExpression Build(params object[] objects) { PassiveExpression result = new PassiveExpression(); // flatten expressions, if needed foreach (object obj in objects) { if (obj is PassiveExpression) { foreach (object symbol in (PassiveExpression)obj) { result.Add(symbol); } } else { result.Add(obj); } } return(result); }