Esempio n. 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;
        }
Esempio n. 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);
 }
Esempio n. 4
0
 public static If New(Expression Condition, Statement True)
 {
     return new If(Condition, True, null);
 }
Esempio n. 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);
 }
Esempio n. 6
0
 private If(Expression Condition, Statement True, Statement False)
 {
     cond = Condition;  _true = True; _false = False;
 }
Esempio n. 7
0
 public static DoWhile New(Statement Body)
 {
     return new DoWhile(Body, null);
 }
Esempio n. 8
0
 /// <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);
 }
Esempio n. 9
0
 private DoWhile(Statement Body, Expression Condition)
 {
     body = Body; cond = Condition;
 }
Esempio n. 10
0
 public static While New(Statement Body)
 {
     return new While(null, Body);
 }
Esempio n. 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);
 }
Esempio n. 12
0
 private While(Expression Condition, Statement Body)
 {
     cond = Condition; body = Body;
 }
Esempio n. 13
0
 public static StmtFunction New(string Name, Statement Body, params Variable[] Params)
 {
     return New(Name, Body, Params.AsEnumerable());
 }
Esempio n. 14
0
 /// <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());
 }
Esempio n. 15
0
 public static StmtFunction New(Statement Body, params Variable[] Params)
 {
     return New(Body, Params.AsEnumerable());
 }
Esempio n. 16
0
 /// <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());
 }