Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2_2_9) is shown here.
parse_meta_method(container, single, tk, comment)
public
Parses a meta-programmed method
Show source
def parse_meta_method(container, single, tk, comment)
column = tk.char_no
offset = tk.seek
line_no = tk.line_no
start_collecting_tokens
add_token tk
add_token_listener self
skip_tkspace false
singleton = !!comment.text.sub!(/(^# +:?)(singleton-)(method:)/, '\1\3')
name = parse_meta_method_name comment, tk
return unless name
meth = RDoc::MetaMethod.new get_tkread, name
record_location meth
meth.offset = offset
meth.line = line_no
meth.singleton = singleton
remove_token_listener self
meth.start_collecting_tokens
indent = TkSPACE.new 0, 1, 1
indent.set_text " " * column
position_comment = TkCOMMENT.new 0, line_no, 1
position_comment.value = "# File #{@top_level.relative_name}, line #{line_no}"
meth.add_tokens [position_comment, NEWLINE_TOKEN, indent]
meth.add_tokens @token_stream
parse_meta_method_params container, single, meth, tk, comment
meth.comment = comment
@stats.add_method meth
meth
end