Method: RDoc::Parser::Ruby#parse_symbol_in_arg

Defined in:
lib/rdoc/parser/ruby.rb

#parse_symbol_in_argObject

Returns symbol text from the next token



2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
# File 'lib/rdoc/parser/ruby.rb', line 2000

def parse_symbol_in_arg
  tk = get_tk
  if :on_symbol == tk[:kind] then
    tk[:text].sub(/^:/, '')
  elsif :on_tstring == tk[:kind] then
    tk[:text][1..-2]
  elsif :on_dstring == tk[:kind] or :on_ident == tk[:kind] then
    nil # ignore
  else
    warn("Expected symbol or string, got #{tk.inspect}") if $DEBUG_RDOC
    nil
  end
end