Exemple #1
0
        Expression shift()
        {
            Token      temp = next;
            Expression x    = add();

            while (true)
            {
                switch (t)
                {
                case TokenKind.ShiftLeft:
                    move(); x = new ShiftLeft(x, add(), temp.line, temp.col); continue;

                case TokenKind.ShiftRight:
                    move(); x = new ShiftRight(x, add(), temp.line, temp.col); continue;

                default:
                    return(x);
                }
            }
        }
 Expression shift()
 {
     Token temp = next;
     Expression x = add();
     while (true)
     {
         switch (t)
         {
             case TokenKind.ShiftLeft:
                 move(); x = new ShiftLeft(x, add(), temp.line, temp.col); continue;
             case TokenKind.ShiftRight:
                 move(); x = new ShiftRight(x, add(), temp.line, temp.col); continue;
             default:
                 return x;
         }
     }
 }