Example #1
0
 public CToken Read()
 {
     if (iRead < queue.Count)
     {
         var token = queue[iRead++];
         if (iRead == queue.Count)
         {
             queue.Clear();
             iRead = 0;
         }
         return(token);
     }
     return(lexer.Read());
 }
Example #2
0
        private CToken ReadToken()
        {
            if (this.tokenPrev.Type == CTokenType.None)
            {
                return(lexer.Read());
            }
            var token = this.tokenPrev;

            this.tokenPrev = new CToken();
            return(token);
        }