Contents
- start
- is this function already in the middle of a comment?
- yes, this function is already in the middle of a comment.
- get a handle to the current comment.
- append the new text to it.
- else
- no, the current function is not already building a comment.
- so start a new one with this text.
- return all done!
- start
- do we have any arguments?
- yes, we have arguments -- print usage and die.
- endif
- foreach line from stdin
- hack out a few Doxygen bits, if found
- is this a pseudocode line?
- {1,2})\s*(.*?)\s*$/ ) {
- yes, this is a metadata line
- parse line
- is this a new command?
- yes, this is a new command.
- parse out command and options
- cleanse comment for HTML display
- did this line start a new command?
- yes, this is a new command
- finish last command
- process this command
- case func.
- print last (finished) function
- start a new function
- case return/continue/break
- case block
- case warning/todo/notyet/...
- case note/question/review/...
- case crit/key
- case commented
- case for/if/while/...
- case switch
- case else
- case case
- case endfor/endif/...
- case endswitch
- case default display warning
- else
- no, this is not a command line
- does this line have program code before the comment?
- yes, this line appears to have program code before the comment.
- assume we are to start a new comment.
- else
- no, this is presumably a continuation of the previous comment.
- add text to current comment
- else
- no, this is not a metadata line
- commit (completed) comment to the current function, if either exists
- close last function
- crit print everything to stdout
- return all done!
- start
print header/TOC
- print header
- print TOC
- finish TOC
print function bodies
- start function bodies
- iterate through each function
- start function
- iterate through each comment
- catch up to this comment's correct indentation level
- warning it would be better if some validation appeared here
- format comment
- background colors disabled until reliable and attractive solution is found to handle colorized nested blocks.
- render comment
- clean up any broken indents
- finish function
- end body
- start
- extract the current function
- is the current function already in the middle of a comment?
- yes, the current function is in the middle of a comment.
- finish the current comment.
- initialize the new comment to default values (let the caller override)
- make the new comment the "current" comment for the function
- should we close this comment now, immediately upon creation?
- yes, we should (either AutoFinish was specified or the comment ended in a period).
- finish the "current" comment for this function (which is the one we just made).
- return all done!