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

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