Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2_2_9) is shown here.
get_end_token(tk)
public
Little hack going on here. In the statement:
f = 2*(1+yield)
We see the RPAREN as the next token, so we need to exit early. This still
won’t catch all cases (such as “a = yield + 1”
# File lib/rdoc/parser/ruby.rb, line 449
def get_end_token tk # :nodoc:
case tk
when TkLPAREN, TkfLPAREN
TkRPAREN
when TkRPAREN
nil
else
TkNL
end
end