4 # A TokenStream is a list of tokens, gathered during the parse of some entity
5 # (say a method). Entities populate these streams by being registered with the
6 # lexer. Any class can collect tokens by including TokenStream. From the
7 # outside, you use such an object by calling the start_collecting_tokens
8 # method, followed by calls to add_token and pop_token.
10 module RDoc::TokenStream
16 def start_collecting_tokens
25 tks.each {|tk| add_token(tk)}