class_docstr: A token stream is an iterable that yields :class:`Token`\s.  The
  parser however does not iterate over it but calls :meth:`next` to go
  one token ahead.  The current active token is stored as :attr:`current`.
class_docstr_tok: ["A","token","stream","is","an","iterable","that","yields",":","class",":","`","Token","`","\\s",".","The","parser","however","does","not","iterate","over","it","but","calls",":","meth",":","`","next","`","to","go","one","token","ahead",".","The","current","active","token","is","stored","as",":","attr",":","`","current","`","."]
code: def __init__(
      self,
      generator: t.Iterable[Token],
      name: t.Optional[str],
      filename: t.Optional[str],
  ):
      self._iter = iter(generator)
      self._pushed: "te.Deque[Token]" = deque()
      self.name = name
      self.filename = filename
      self.closed = False
      self.current = Token(1, TOKEN_INITIAL, "")
      next(self)
  
imports: import re
  import typing
  from ast import literal_eval
  from collections import deque
  from sys import intern
  from ._identifier import pattern
  from .exceptions import TemplateSyntaxError
  from .utils import LRUCache
label_desc: Use image node_id 1 to create a new TokenStream object  with example: obj = TokenStream(generator, name, filename)