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

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