doc::parse_comment_text (private)
doc::parse_comment_text proc_block
Defined in packages/acs-templating/tcl/doc-tcl-procs.tcl
called by parse_namespace
- Parameters:
- proc_block (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: doc::set_proc_name_source_text_comment_text $proc_block doc::util::make_text_listable comment_text # this will need to be changed # set proc_name [lindex [template::util::comment_text_normalize $source_text] 1] #set these values to blank in case they are not specified in the comment text foreach column { description author return } { set info_$column "" } # if we wanted to include the source text for the procedure as well: # set proc_info [list [list proc_name $proc_name] [list source $source_text]] set proc_param [list] set proc_option [list] set proc_see [list] set directives [lsort -index 0 [template::parse_directives $comment_text]] foreach directive $directives { set directive_type [lindex $directive 0] set directive_comments [template::util::quote_space [lindex $directive 1]] switch -exact $directive_type { public - private { set public_private $directive_type set info_description [lrange $directive_comments 1 end ] } author - return { set info_$directive_type $directive_comments } option - param { set directive_name [lindex $directive_comments 0] if { [string match -nocase {default *} [lindex $directive_comments 1]] } { lappend proc_$directive_type [list name "$directive_name" default "[lrange [lindex $directive_comments 1] 1 end]" description "[lrange $directive_comments 2 end]" ] } else { if {$directive_type eq "param"} { set default_comment "required" } else { set default_comment "" } lappend proc_$directive_type [list name "$directive_name" default "$default_comment" description "[lrange $directive_comments 1 end]" ] } } see { doc::sort_see proc_$directive_type $directive_comments } } } set proc_info [list proc_name "$proc_name" author "$info_author" description "$info_description" return "$info_return" ] set proc_result [list data [list "$proc_info" "$proc_param" "$proc_option" "$proc_see"] name "$proc_name"] upvar namespace_$public_private proc_list # set proc_list [lindex $namespace_proc 1] lappend proc_list $proc_result set proc_list [lsort $proc_list]XQL Not present: Generic, PostgreSQL, Oracle