Exemple #1
0
 private For(Statement Init, Expression Condition, Statement Step, Statement Body)
 {
     init = Init;
     cond = Condition;
     step = Step;
     body = Body;
 }
        private StmtFunction(string Name, Statement Body, IEnumerable<Variable> Params)
            : base(Name)
        {
            if (ReferenceEquals(Body, null))
                throw new ArgumentNullException("Body");

            body = Body;
            parameters = Params;
        }
Exemple #3
0
 /// <summary>
 /// Create a new for loop.
 /// </summary>
 /// <param name="Init"></param>
 /// <param name="Condition"></param>
 /// <param name="Step"></param>
 /// <param name="Body"></param>
 /// <returns></returns>
 public static For New(Statement Init, Expression Condition, Statement Step, Statement Body)
 {
     return new For(Init, Condition, Step, Body);
 }
Exemple #4
0
 public static If New(Expression Condition, Statement True)
 {
     return new If(Condition, True, null);
 }
Exemple #5
0
 /// <summary>
 /// Create a new if statement.
 /// </summary>
 /// <param name="Condition"></param>
 /// <param name="True"></param>
 /// <param name="False"></param>
 /// <returns></returns>
 public static If New(Expression Condition, Statement True, Statement False)
 {
     return new If(Condition, True, False);
 }
Exemple #6
0
 private If(Expression Condition, Statement True, Statement False)
 {
     cond = Condition;  _true = True; _false = False;
 }
 public static DoWhile New(Statement Body)
 {
     return new DoWhile(Body, null);
 }
 /// <summary>
 /// Create a new while loop.
 /// </summary>
 /// <param name="Condition"></param>
 /// <param name="Body"></param>
 /// <returns></returns>
 public static DoWhile New(Statement Body, Expression Condition)
 {
     return new DoWhile(Body, Condition);
 }
 private DoWhile(Statement Body, Expression Condition)
 {
     body = Body; cond = Condition;
 }
Exemple #10
0
 public static While New(Statement Body)
 {
     return new While(null, Body);
 }
Exemple #11
0
 /// <summary>
 /// Create a new while loop.
 /// </summary>
 /// <param name="Condition"></param>
 /// <param name="Body"></param>
 /// <returns></returns>
 public static While New(Expression Condition, Statement Body)
 {
     return new While(Condition, Body);
 }
Exemple #12
0
 private While(Expression Condition, Statement Body)
 {
     cond = Condition; body = Body;
 }
 public static StmtFunction New(string Name, Statement Body, params Variable[] Params)
 {
     return New(Name, Body, Params.AsEnumerable());
 }
 /// <summary>
 /// Create a new named function defined by a statement.
 /// </summary>
 /// <param name="Name"></param>
 /// <param name="Body"></param>
 /// <param name="Params"></param>
 /// <returns></returns>
 public static StmtFunction New(string Name, Statement Body, IEnumerable<Variable> Params)
 {
     return new StmtFunction(Name, Body, Params.Buffer());
 }
 public static StmtFunction New(Statement Body, params Variable[] Params)
 {
     return New(Body, Params.AsEnumerable());
 }
 /// <summary>
 /// Create a new anonymous function defined by a statement.
 /// </summary>
 /// <param name="Body"></param>
 /// <param name="Params"></param>
 /// <returns></returns>
 public static StmtFunction New(Statement Body, IEnumerable<Variable> Params)
 {
     return new StmtFunction("<Anonymous>", Body, Params.Buffer());
 }