Class SourceIterator

    • Constructor Detail

      • SourceIterator

        public SourceIterator​(@Nonnull
                              Source s)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Returns true if the enclosed Source has more tokens. The EOF token is never returned by the iterator.
        Specified by:
        hasNext in interface Iterator<Token>
        Throws:
        IllegalStateException - if the Source throws a LexerException or IOException
      • next

        public Token next()
        Returns the next token from the enclosed Source. The EOF token is never returned by the iterator.
        Specified by:
        next in interface Iterator<Token>
        Throws:
        IllegalStateException - if the Source throws a LexerException or IOException