method
parse_require
v1_9_1_378 -
Show latest stable
- Class:
RDoc::Parser::Ruby
parse_require(context, comment)public
No documentation available.
# File lib/rdoc/parser/ruby.rb, line 2298
def parse_require(context, comment)
skip_tkspace_comment
tk = get_tk
if TkLPAREN === tk then
skip_tkspace_comment
tk = get_tk
end
name = nil
case tk
when TkSTRING
name = tk.text
# when TkCONSTANT, TkIDENTIFIER, TkIVAR, TkGVAR
# name = tk.name
when TkDSTRING
warn "Skipping require of dynamic string: #{tk.text}"
# else
# warn "'require' used as variable"
end
if name
context.add_require RDoc::Require.new(name, comment)
else
unget_tk(tk)
end
end