Exemple #1
0
        public Tokenizer(SimpleStringReader reader, ImmutableArray <TokenType> delimiters)
        {
            Assumes.NotNull(reader);

            _reader     = reader;
            _delimiters = delimiters;
        }
Exemple #2
0
        private Token?GetTokenFrom(SimpleStringReader reader)
        {
            if (reader.CanRead)
            {
                return(GetToken(reader.Read()));
            }

            return(null);
        }
Exemple #3
0
        private Token?PeekToken()
        {
            SimpleStringReader reader = _reader.Clone();

            return(GetTokenFrom(reader));
        }