10
10
module RDoc::TokenStream
13
# Adds +tokens+ to the collected tokens
15
def add_tokens(*tokens)
16
tokens.flatten.each { |token| @token_stream << token }
16
def start_collecting_tokens
19
alias add_token add_tokens
22
# Starts collecting tokens
28
alias start_collecting_tokens collect_tokens
25
tks.each {|tk| add_token(tk)}
31
# Remove the last token from the collected tokens
38
# Current token stream
45
# Returns a string representation of the token stream
48
token_stream.map { |token| token.text }.join ''