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

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