gsub!(/\$[A-Z_]+/) {|m| m.delete!("$").reverse.downcase!.concat(" b@").reverse}
case $_
- when /^$/
+ when /^\s*$/
if doxy == 1
buf.push($_)
end
- when /\/\/\/\//
+ when /\/\*=\*\//
commentblock(buf)
buf = []
- when /\/\*\s.*\*\// # /* comment */ type comment
+ when /^\/\*\s.*\*\// # /* comment */ type comment
if doxy == 1
- buf.push($_.gsub!(/\*\//, " ").gsub!(/\/\*/, "//")) # should be included only in the example code
+ # should be included only in the example code
+ ## We used to do the following substituion as a workaround of
+ ## a Doxygen bug.
+ ## buf.push($_.gsub!(/\*\//, " ").gsub!(/\/\*/, "//"))
+ buf.push($_)
+ end
+
+ when /\/\*\s.*\*\// # code + /* comment */ type comment
+ if doxy == 1
+ # should be included in the example code
+ ## See the above comment.
+ ## buf.push($_.gsub!(/\*\//, " ").gsub!(/\/\*/, "//"))
+ buf.push($_) # should be included in the example code
else
if doxy == 0
- commentblock(buf)
- buf = []
- print $_.gsub!(/\/\*\s.*\*\//," ") # should be omiited in code
+ commentblock(buf)
+ buf = []
+ print $_.gsub!(/\/\*\s.*\*\//," ") # should be omiited in code
end
end
+
when /\/\*{2,3}ja.*\*\// #japanese one liner
when /\/\*\*en.*\*\// #one liner
when /\/\*\*\*en.*\*\// #one liner
when /\/\*\*\*\s.*\*\// #one liner
buf.push($_.gsub!(/\/\*+/, " ").gsub!(/\*\//, " ")).push("\n")
- when /\/\*{1,2}\s|\/\*{2,3}ja|\/\*\*en/
+ when /\/\*{1,2}\s|\/\*{2,3}ja|\/\*\*en/ #this is not for En nor users
doxy = -1
when /\/\*\*\*en/
buf.push($_.gsub!(/\/\*+en/, " "))
doxy = 1
when /EXAMPLE_CODE/
- buf.push($_.gsub!(/#if EXAMPLE_CODE/, "@code \n"))
+ buf.push($_.gsub!(/#if EXAMPLE_CODE/, "\n \n @par Example:\n @code"))
doxy = 1
when /#endif/
end
end
end
+
+commentblock(buf)