peek_token

peek_token() Instance Public methods Returns the next token on the stream without modifying the stream

setup_scanner

setup_scanner(input) Instance Public methods Creates the StringScanner

skip

skip(token_type, error = true) Instance Public methods Skips the next token if its type is token_type. Optionally raises an error if the next token is not of the expected type.

token_pos

token_pos(byte_offset) Instance Public methods Calculates the column (by character) and line of the current token from scanner based on byte_offset.

tokenize 2

tokenize(input) Instance Public methods Turns text input into a stream of tokens

unget

unget() Instance Public methods Returns the current token to the token stream

new

new(input_file_name, include_path) Class Public methods Creates a new pre-processor for input_file_name that will look for included files in include_path

post_process

post_process(&block) Class Public methods Adds a post-process handler for directives. The handler will be called with the result RDoc::Comment (or text String) and the code object for the comment (if any).

post_processors

post_processors() Class Public methods Registered post-processors

register

register(directive, &block) Class Public methods Registers directive as one handled by RDoc. If a block is given the directive will be replaced by the result of the block, otherwise the directive will be removed from the processed text. The block will be called with the directive name and the directive parameter: RDoc::Markup::PreProcess.register 'my-directive' do |directive, param| # replace text, etc. end