mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Import RDoc 2.5.4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
37e59f5583
commit
75ef9e79d6
14 changed files with 169 additions and 77 deletions
|
@ -1524,24 +1524,29 @@ class RDoc::Parser::Ruby < RDoc::Parser
|
|||
skip_tkspace false
|
||||
tk = get_tk
|
||||
case tk
|
||||
when TkLPAREN, TkfLPAREN
|
||||
when TkLPAREN, TkfLPAREN then
|
||||
end_token = TkRPAREN
|
||||
else
|
||||
end_token = TkNL
|
||||
end
|
||||
|
||||
b_nest = 0
|
||||
nest = 0
|
||||
@scanner.instance_eval{@continue = false}
|
||||
@scanner.instance_eval { @continue = false }
|
||||
|
||||
loop do
|
||||
case tk
|
||||
when TkSEMICOLON
|
||||
break
|
||||
when TkLPAREN, TkfLPAREN
|
||||
when TkSEMICOLON then
|
||||
break if b_nest.zero?
|
||||
when TkLPAREN, TkfLPAREN then
|
||||
nest += 1
|
||||
when TkBEGIN then
|
||||
b_nest += 1
|
||||
when TkEND then
|
||||
b_nest -= 1
|
||||
when TkDO
|
||||
break if nest.zero?
|
||||
when end_token
|
||||
when end_token then
|
||||
if end_token == TkRPAREN
|
||||
nest -= 1
|
||||
break if @scanner.lex_state == EXPR_END and nest.zero?
|
||||
|
@ -1553,6 +1558,7 @@ class RDoc::Parser::Ruby < RDoc::Parser
|
|||
end
|
||||
tk = get_tk
|
||||
end
|
||||
|
||||
skip_tkspace false
|
||||
|
||||
get_tk if TkDO === peek_tk
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue