Method: RDoc::Parser::Ruby#parse_method_name_regular
- Defined in:
- lib/rdoc/parser/ruby.rb
#parse_method_name_regular(container, name_t) ⇒ Object
For the given container
and initial name token name_t
the method name is parsed from the token stream for a regular method.
1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 |
# File 'lib/rdoc/parser/ruby.rb', line 1520 def parse_method_name_regular container, name_t # :nodoc: if :on_op == name_t[:kind] && (%w{* & [] []= <<}.include?(name_t[:text])) then name_t[:text] else unless [:on_kw, :on_const, :on_ident].include?(name_t[:kind]) then warn "expected method name token, . or ::, got #{name_t.inspect}" skip_method container return end name_t[:text] end end |