Method: RDoc::Parser::Ruby#parse_symbol_arg_space

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

#parse_symbol_arg_space(no, tk) ⇒ Object

Parses up to no symbol arguments separated by spaces and places them in args.



1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
# File 'lib/rdoc/parser/ruby.rb', line 1969

def parse_symbol_arg_space no, tk # :nodoc:
  args = []

  unget_tk tk
  if tk = parse_symbol_in_arg
    args.push tk
    return args if no and args.size >= no
  end

  loop do
    skip_tkspace_without_nl

    tk1 = get_tk
    if tk1.nil? || :on_comma != tk1[:kind] then
      unget_tk tk1
      break
    end

    skip_tkspace_comment
    if tk = parse_symbol_in_arg
      args.push tk
      break if no and args.size >= no
    end
  end

  args
end