Esempio n. 1
0
 public Token Peek()
 {
     if (Lookahead == null)
     {
         if (!TokenIterator.MoveNext())
             return null;
         Lookahead = TokenIterator.Current;
     }
     return Lookahead;
 }
Esempio n. 2
0
 public Token NextToken()
 {
     if (Lookahead != null)
     {
         var lh = Lookahead;
         Lookahead = null;
         return lh;
     }
     else
     {
         if (!TokenIterator.MoveNext())
             return null;
         return TokenIterator.Current;
     }
 }