|
From: christian O. <xo...@gm...> - 2010-04-25 13:53:30
|
Hello, My firts time in this list :p Is it posible to show all functions and procedures (the code)? -- Christian |
|
From: Michalis K. <mic...@gm...> - 2010-04-25 16:02:24
|
christian Ortiz wrote: > Hello, > > My firts time in this list :p > > Is it posible to show all functions and procedures (the code)? > PasDoc shows all the functions and procedures (in a unit, and there's a page generated with all the functions / procedures sorted in a whole project). However, we show only the interface of the functions, not the implementation (if that is what you mean by "code"). One reason is that PasDoc cannot parse implementation at all now (http://pasdoc.sipsolutions.net/WantedFeaturesParsingImplementation), and the other reason is that it's questionable if we want to include implementation in the documentation. Although if it was an optional feature, I would not say no (e.g. Drupal documentation like http://api.drupal.org/api/function/hook_menu/6 shows the implementation, and it's helpful when docs and not perfect). Contributions are welcome :) Michalis |
|
From: christian O. <xo...@gm...> - 2010-04-25 21:30:01
|
2010/4/25 Michalis Kamburelis <mic...@gm...> > christian Ortiz wrote: > > Hello, > > > > My firts time in this list :p > > > > Is it posible to show all functions and procedures (the code)? > > > > PasDoc shows all the functions and procedures (in a unit, and there's a > page generated with all the functions / procedures sorted in a whole > project). However, we show only the interface of the functions, not the > implementation (if that is what you mean by "code"). > i mean to the implementation > > One reason is that PasDoc cannot parse implementation at all now > (http://pasdoc.sipsolutions.net/WantedFeaturesParsingImplementation), > and the other reason is that it's questionable if we want to include > implementation in the documentation. Although if it was an optional > feature, I would not say no (e.g. Drupal documentation like > http://api.drupal.org/api/function/hook_menu/6 shows the implementation, > and it's helpful when docs and not perfect). > Ok i understand your point, but could be a great future( near :p) option > > Contributions are welcome :) > > Michalis > > > ------------------------------------------------------------------------------ > _______________________________________________ > Pasdoc-main mailing list > Pas...@li... > https://lists.sourceforge.net/lists/listinfo/pasdoc-main > -- Christian |
|
From: Hans-Peter D. <DrD...@ao...> - 2010-04-25 22:29:00
|
Michalis Kamburelis schrieb: > One reason is that PasDoc cannot parse implementation at all now For this purpose IMO the FPC parser should be used, that tracks the Delphi language development as well as the Free Pascal development. That's why I stopped working on the implementation of new syntax elements in the PasDoc2 parser, including the syntax in the implementation section. DoDi |
|
From: Michalis K. <mic...@gm...> - 2010-04-26 01:28:53
|
Hans-Peter Diettrich wrote: > Michalis Kamburelis schrieb: > >> One reason is that PasDoc cannot parse implementation at all now > > For this purpose IMO the FPC parser should be used, that tracks the > Delphi language development as well as the Free Pascal development. > That's why I stopped working on the implementation of new syntax > elements in the PasDoc2 parser, including the syntax in the > implementation section. > Unfortunately, the parser inside the compiler isn't really reusable. There is a separate package, fcl-passrc, that is a nice reusable library, but it got implementation support only recently and still doesn't support all FPC / Delphi features even for the interface. This is known (see the discussions this month on fpc-pascal list). I just tested the current version of fcl-passrc on PasDoc testcases, see my email on fpc-pascal with bugreports: http://lists.freepascal.org/lists/fpc-pascal/2010-April/024755.html . Well, actually that was kind of promising :), it failed on some difficult tests but managed to parse a lot of simpler testcases. For PasDoc we'll also need to modify it to gather the comments and attach them to the item (following PasDoc' logic of glueing // comments, back comments by //< and such), currently it just discards the comments as far as I can see. Also, if you want to keep PasDoc compileable with Delphi (not only FPC), you will have to test and eventually fix fcl-passrc compilation with Delphi. So: I'm all after using fcl-passrc :), but for now we have to use pasdoc's internal parser. Michalis |
|
From: Hans-Peter D. <DrD...@ao...> - 2010-04-26 13:09:05
|
Michalis Kamburelis schrieb: > Unfortunately, the parser inside the compiler isn't really reusable. Too bad :-( I hoped that it could be made usable, with a few patches. Lazarus also would be happy with it... > For PasDoc we'll also need to modify it to gather the comments and > attach them to the item (following PasDoc' logic of glueing // comments, > back comments by //< and such), currently it just discards the comments > as far as I can see. Perhaps we can add an option, how to deal with comments. Did you have an look at FPDoc? > Also, if you want to keep PasDoc compileable with Delphi (not only FPC), > you will have to test and eventually fix fcl-passrc compilation with Delphi. I have no newer Delphi version at hand. A conversion to Unicode (D2009+) may require much work. > So: I'm all after using fcl-passrc :), but for now we have to use > pasdoc's internal parser. When a new parser shall be integrated, it deserves many changes in the item classes. I've tried to prepare the documenters to handle the stored lists more flexible, but new branches in the source tree (local types, interface/implementation) will deserve according implementation in every document generator. DoDi |
|
From: Michalis K. <mic...@gm...> - 2010-04-27 22:35:04
|
Hans-Peter Diettrich wrote: > Perhaps we can add an option, how to deal with comments. Did you have an > look at FPDoc? Yeah, and fpdoc uses fcl-passrc. However, fpdoc doesn't read the documentation strings from the comments, so for it comments may be simply discarded. If someone has time to prepare a patch for fcl-passrc so that e.g. some virtual TPasTreeContainer method is called when a comment is found (this virtual method would do nothing in TPasTreeContainer, but could be overridden in descendants to do something more useful, e.g. add the comment to the last item or store it for the next item) -> it would surely be accepted by FPC :) There remains only the question who has time to do it (not me, at least not now :) ). Michalis |