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_identifier(container, single, tk, comment)public
Parses identifiers that can create new methods or change visibility.
Returns true if the comment was not consumed.
# File lib/rdoc/parser/ruby.rb, line 1092
def parse_identifier container, single, tk, comment # :nodoc:
case tk.name
when 'private', 'protected', 'public', 'private_class_method',
'public_class_method', 'module_function' then
parse_visibility container, single, tk
return true
when 'attr' then
parse_attr container, single, tk, comment
when /^attr_(reader|writer|accessor)$/ then
parse_attr_accessor container, single, tk, comment
when 'alias_method' then
parse_alias container, single, tk, comment
when 'require', 'include' then
# ignore
else
if comment.text =~ /\A#\#$/ then
case comment.text
when /^# +:?attr(_reader|_writer|_accessor)?:/ then
parse_meta_attr container, single, tk, comment
else
method = parse_meta_method container, single, tk, comment
method.params = container.params if
container.params
method.block_params = container.block_params if
container.block_params
end
end
end
false
end Related methods
- Instance methods
- collect_first_comment
- consume_trailing_spaces
- create_attr
- create_module_alias
- error
- get_bool
- get_class_or_module
- get_class_specification
- get_constant
- get_constant_with_optional_parens
- get_end_token
- get_method_container
- get_symbol_or_name
- get_tkread_clean
- get_visibility_information
- look_for_directives_in
- make_message
- new_comment
- parse_alias
- parse_attr
- parse_attr_accessor
- parse_call_parameters
- parse_class
- parse_class_regular
- parse_class_singleton
- parse_comment
- parse_comment_attr
- parse_comment_ghost
- parse_comment_tomdoc
- parse_constant
- parse_constant_body
- parse_extend_or_include
- parse_identifier
- parse_meta_attr
- parse_meta_method
- parse_meta_method_name
- parse_meta_method_params
- parse_method
- parse_method_dummy
- parse_method_name
- parse_method_name_regular
- parse_method_name_singleton
- parse_method_or_yield_parameters
- parse_method_parameters
- parse_method_params_and_body
- parse_module
- parse_require
- parse_rescue
- parse_statements
- parse_symbol_arg
- parse_symbol_arg_paren
- parse_symbol_arg_space
- parse_symbol_in_arg
- parse_top_level_statements
- parse_visibility
- parse_yield
- read_directive
- read_documentation_modifiers
- record_location
- remove_private_comments
- scan
- skip_for_variable
- skip_method
- skip_optional_do_after_expression
- skip_tkspace_comment
- stop_at_EXPR_END
- suppress_parents
- update_visibility
- warn
- Class methods
- new