Read() public method

public Read ( ) : bool
return bool
        public bool Read()
        {
            CheckDisposed();

            if (_hasMore)
            {
                while (
                    _tokenizer.Read() &&
                    (
                        _tokenizer.Current.Type == TSQLTokenType.SingleLineComment ||
                        _tokenizer.Current.Type == TSQLTokenType.MultilineComment ||
                        _tokenizer.Current.Type == TSQLTokenType.Whitespace ||
                        (
                            _tokenizer.Current.Type == TSQLTokenType.Character &&
                            _tokenizer.Current.AsCharacter.Character == TSQLCharacters.Semicolon
                        )
                    ))

                {
                }

                if (_tokenizer.Current == null)
                {
                    _hasMore = false;

                    return(_hasMore);
                }

                _current = new TSQLStatementParserFactory().Create(_tokenizer.Current).Parse(_tokenizer);
            }

            return(_hasMore);
        }
 public void SelectClause_StopAtFrom()
 {
     using (StringReader reader = new StringReader(@"select a from b;"))
     using (TSQLTokenizer tokenizer = new TSQLTokenizer(reader))
     {
         Assert.IsTrue(tokenizer.Read());
         TSQLSelectClause select = new TSQLSelectClauseParser().Parse(tokenizer);
         Assert.AreEqual(2, select.Tokens.Count);
         Assert.AreEqual(TSQLKeywords.FROM, tokenizer.Current.AsKeyword.Keyword);
     }
 }