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

        public static BinaryExpression And(BashExpression lhs, BashExpression rhs)
        {
            return(new BinaryExpression(lhs, rhs, BinaryExpressionType.And));
        }