# File lib/rdoc/parser/ruby.rb, line 1638
def get_constant_with_optional_parens
skip_tkspace(false)
nest = 0
while TkLPAREN === (tk = peek_tk) or TkfLPAREN === tk do
get_tk
skip_tkspace(true)
nest += 1
end
name = get_constant
while nest > 0
skip_tkspace(true)
tk = get_tk
nest -= 1 if TkRPAREN === tk
end
name
end