From: SourceForge.net <no...@so...> - 2011-08-08 10:27:50
|
Bugs item #2500102, was opened at 2009-01-11 23:43 Message generated for change (Comment added) made by kambi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104213&aid=2500102&group_id=4213 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: parser (Delphi 200x features) Group: 0.11.0 >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: Michalis Kamburelis (kambi) Summary: Error when parsing Delphi 2009 files with generics Initial Comment: In Delphi 2009, Generics where introduced using a syntax like type TMyList = TObjectList<MyClass> This creates an TObjectList descendant using Items of MyClass. Also you may inherit like type TMyList = class(TObjectList<MyClass>) {...} end; Unfortunately, PasDoc ist not able to parse these files because of the "<" and ">". Therefore, the whole file is not included in the documentation. All that is needed is to treat "<" and ">" as part of the class-name. Hopefully, this will be fixed soon. Thomas Hummes tho...@gm... ---------------------------------------------------------------------- >Comment By: Michalis Kamburelis (kambi) Date: 2011-08-08 12:27 Message: Generics are now fully handled by PasDoc (both specialization and declaration of generic classes). The current testcase http://pasdoc.svn.sourceforge.net/viewvc/pasdoc/trunk/tests/ok_generic.pas is parsed without problems :) To try it yourself, use PasDoc from SVN, or http://pasdoc.sipsolutions.net/DevelopmentSnapshots, or just wait for next release. ---------------------------------------------------------------------- Comment By: Michalis Kamburelis (kambi) Date: 2011-07-23 23:41 Message: This is partially solved since some time. See my mail "[Pasdoc-main] Parsing of generics specialization" on pasdoc-main mailing list, https://sourceforge.net/mailarchive/forum.php?thread_name=4D386FD3.7060505%40gmail.com&forum_name=pasdoc-main See also SVN commit 1290. Works for Delphi and FPC generic syntax. Our testcase http://pasdoc.svn.sourceforge.net/viewvc/pasdoc/trunk/tests/ok_generic.pas includes some examples. This works exactly like you describe, we just add "<...>" to the class name. This isn't a fully correct solution (e.g. we will not correctly detect later that actually ancestor is "TObjectList", not literally "TObjectList<MyClass>"), that's why I'm leaving this bug open for now. But at least parsing the unit with generic specialization works, and result looks sensible. You can test it now by compiling pasdoc from SVN or getting http://pasdoc.sipsolutions.net/DevelopmentSnapshots ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104213&aid=2500102&group_id=4213 |