public IfStatement( BashExpression condition, Command[] then, Command[] elseThen = null) { Condition = condition; Then = then; Else = elseThen; }
public ElIfStatement(BashExpression condition, Command then) { Condition = condition ?? throw new ArgumentNullException(nameof(condition)); Then = then; }
public IfStatement(BashExpression condition, Command then) { Condition = condition; Then = new[] { then }; }
public BinaryExpression(BashExpression lhs, BashExpression rhs, BinaryExpressionType type) { Left = lhs; Right = rhs; Type = type; }
public static BinaryExpression Or(BashExpression lhs, BashExpression rhs) { return(new BinaryExpression(lhs, rhs, BinaryExpressionType.Or)); }
// [ -r $1 ] && [ -s $1 ] public static BinaryExpression And(BashExpression lhs, BashExpression rhs) { return(new BinaryExpression(lhs, rhs, BinaryExpressionType.And)); }