示例#1
0
 private Token GetCurrentToken()
 {
     if (currentToken == null)
     {
         if (scanner.InternalMoveNext())
         {
             currentToken = scanner.Current;
         }
     }
     return(currentToken);
 }
示例#2
0
        private Token GetCurrentToken()
        {
            if (currentToken == null)
            {
                while (scanner.InternalMoveNext())
                {
                    currentToken = scanner.Current;

                    var commentToken = currentToken as Comment;
                    if (commentToken != null)
                    {
                        pendingEvents.Enqueue(new Events.Comment(commentToken.Value, commentToken.IsInline, commentToken.Start, commentToken.End));
                    }
                    else
                    {
                        break;
                    }
                }
            }
            return(currentToken);
        }