Exemplo n.º 1
0
 public Sequence(List <BaseStatement> statements)
 {
     Reducible = true;
     if (statements.Count >= 2)
     {
         Last  = new Queue <BaseStatement>(statements);
         First = Last.Dequeue();
     }
     else
     {
         if (statements.Count == 0)
         {
             First = new DoNothing();
         }
         else
         {
             First = statements[0];
         }
         Last = new Queue <BaseStatement>();
     }
 }
Exemplo n.º 2
0
 public Sequence(BaseStatement first, Queue <BaseStatement> last)
 {
     Reducible = true;
     First     = first;
     Last      = last;
 }