|
From: Hans-Peter D. <DrD...@ao...> - 2009-01-16 19:52:59
|
Thomas Hummes schrieb: >> More extensions to the parser are required, new keywords like >> "generic" and the related syntax, etc. > > This is not really correct. To use e.g. a generic TObjectList you > need to include the unit "Generics.Collections" and may then write > something like: > > type TMyList = TObjectList<TStringList>; > > This creates a generic descendant of TObjectList containing > TStringLists. I.e. TObjectList<TStringList> sould be treated as something like a qualified typename? If so, of what type class? Should it become a CIO, or some unspecific type like "integer"? A CIO with ancestor TObjectList IMO were the closest internal representation. From the viewpoint of a user: where should the typename occur in the generated documentation, as TYPE or as CIO-TYPE? > Michalis "dirty" solution isy at least be a solution > for the most used new feature of Delphi 2009. Okay, I'll look into that. Can somebody provide an test unit? > Of course for other new > things like anonymous methods, writing own generics (which needs a > type called <T> as Placeholder for the later used class), a correct > complete grammar ist needed - which I cannot provide, since I don't > really understand how PasDoc works and how changes like these need to > be planned and implemented. A grammar snippet would be very helpful. Can such names only occur in type definitions, i.e.: TypeID ::= ident [ "<" ident ">" ] . TypeDef ::= "type" ident "=" TypeID ";" or also in variable definitions Declaration ::= "var" ident [...] ":" TypeID ";" DoDi |