I just tried to extend the programs in the fpdoc folder, morphing the program files into unit files by conditional compilation:

{$IFDEF DoDi}
unit ...;
interface
{$ELSE}
program ...;
{$ENDIF}

etc., no problem so far.

Then I wrote my own MkSkel program, using MakeSkel as a unit. Also fine :-)

Then I tried to extend the functionality with wildcards, what also worked fine after some more adjustments. E.g. I added an OnOption handler, that handles additional commandline options, which are not recognized by the ParseOption procedure.

BTW is it really required to add "-Fi.", so that the parser finds include files in the current directory (of the unit file)?


When I tried to create the skeletons for all *.pas and *.pp files, I stumbled across exceptions with missing interface sections. It would be nice to prevent such exceptions, when MakeSkel tries to process an program file, whereupon AModule.InterfaceSection is Nil!

Then I was very astonished about "No Interface section in MakeSkel" messages, and it took me some time to find the bug in UnitDiff.pp, which contains
  program MakeSkel;
instead of
  program *UnitDiff*;
Please fix this glitch.


When I finally made --update work for a couple of units, in one run, another bug popped up: MakeSkel seems to misinterpret the following in TestUnit.pp, most probably at:

  ARecordVar : Record
                 A,B : integer;
               end;

A variable ARecordVar is added to the docs, *and* two variables A and B, which IMO better should become ARecordVar.A and ARecordVar.B. When the unit is updated later, these variables A and B are added to the output again - what made me find this bug. When somebody fixes this bug, will it be possible to also suppress the creation of empty output files? This will simplify the separation of changed units from unchanged ones, where currently all created files have to be inspected for real changes manually :-(


Now I'll try to further extend MkSkel by using FPDoc projects, so that the correct input specifications are used, including all compiler options. Then it will be easy to check the RTL and other packages for updates, and to create the skeletons for all contained units :-)

DoDi

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to