method
parse_require
ruby latest stable - Class:
RDoc::RubyParser
parse_require(context, comment)private
No documentation available.
# File lib/rdoc/parsers/parse_rb.rb, line 2407
def parse_require(context, comment)
skip_tkspace_comment
tk = get_tk
if tk.kind_of? TkLPAREN
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(Require.new(name, comment))
else
unget_tk(tk)
end
end