public
Rubygem
Fork of lsegal/yard
Description: Official repository for YARD: Yay! A Ruby Documentation-tool.
Homepage: http://yard.soen.ca / IRC: #yard on irc.freenode.net
Clone URL: git://github.com/tmm1/yard.git
Fix parser handling for blocks + spec
tmm1 (author)
Sun Jun 29 18:12:00 -0700 2008
commit  5fc3dcfc84cb573e3648862506a9056838553c54
tree    7f5056f7a47aec987aec1c111e89d3c734d454a7
parent  c508e500cdebafa97af5829324f472bb03be9300
...
90
91
92
93
94
95
96
 
 
 
 
97
98
99
100
101
...
90
91
92
 
 
 
 
93
94
95
96
97
 
98
99
100
0
@@ -90,12 +90,11 @@ module YARD
0
             #puts "#{tk.line_no} #{level} #{open_parens} #{tk.class.class_name} \t#{tk.text.inspect} #{tk.lex_state} #{open_block.inspect}"
0
 
0
             # Increase level if we have a 'do' or block opening
0
- if tk.class == TkLBRACE #|| tk.class == TkfLBRACE
0
- level += 1
0
- elsif [TkDO, TkBEGIN].include?(tk.class)
0
- #p "#{tk.line_no} #{level} #{tk} \t#{tk.text} #{tk.lex_state}"
0
+ if [TkLBRACE, TkDO, TkBEGIN].include?(tk.class)
0
+ #p "#{tk.line_no} #{level} #{tk} \t#{tk.text} #{tk.lex_state}"
0
+ stmt_number += 1
0
+ new_statement = true
0
               level += 1
0
- open_block = false # Cancel our wish to open a block for the if, we're doing it now
0
             end
0
 
0
             # Vouch to open a block when this statement would otherwise end

Comments

    No one has commented yet.