#532: Finish headerizer refactor
---------------------+------------------------------------------------------
 Reporter:  coke     |       Owner:  jkeenan 
     Type:  todo     |      Status:  assigned
 Priority:  normal   |   Milestone:          
Component:  testing  |     Version:          
 Severity:  medium   |    Keywords:          
     Lang:           |       Patch:          
 Platform:           |  
---------------------+------------------------------------------------------
Changes (by jkeenan):

  * owner:  => jkeenan
  * status:  new => assigned


Comment:

 Since this ticket was filed, ''headerizer.pl'' has been moved from
 ''tools/build/'' to ''tools/dev''.

 I do see that both ''t/codingstd/c_function_docs.t'' and
 ''tools/dev/headerizer.pl'' use the Parrot::Headerizer method
 `extract_function_declarations`.  ''c_function_docs.t'' uses it in a
 straightforward manner:
 {{{
 55  my @function_decls = $headerizer->extract_function_declarations($buf);
 56
 57   for my $function_decl (@function_decls) {
 58
 59    my $escaped_decl =
 $headerizer->generate_documentation_signature($function_decl);
 ...
 }}}
 Its use in ''tools/dev/headerizer.pl'' is less straightforward.  It's
 called within the `main()` subroutine:
 {{{
     313 sub main {
 ...
     369         if ( $macro_match ) {
     370             @decls = $headerizer->extract_function_declarations(
 $source_code );
     371         }
     372         else {
     373             @decls =
 extract_function_declarations_and_update_source( $sourcefile );
     374         }
 }}}
 But if you look at the function in the `else` block, you see that
 `extract_function_declarations` appears within it as well:
 {{{
      83 sub extract_function_declarations_and_update_source {
 ...
      90     my @func_declarations =
 $headerizer->extract_function_declarations( $text );
 }}}
 So I think we'll have to study the control flow in
 ''tools/dev/headerizer.pl'' before we can decide what to do.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/532#comment:2>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to