Re: CComment
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
Hi Bernhard, I'll comment on your patch in a separate mail. Bernhard Fischer wrote: > I've got a question regarding the implementation of CPrevious. > Previous is recognized by means of the '<' character at pos 0 in the > comment text. CPrevious OTOH does not have the '<' character but rather > is a comment which is positioned after some code (See struct bar in > foo.h contained in the tiny testcase referenced above). > > Would i implement CPrevious via > o putting a '<' into the comment when CComment finds code before the > comment? This may be considered a rough hack but may allow me to > simply reuse Previous instead of introducing a new CPrevious.. How are you going to deal with the ambiguities ? Are you sure you want *all* comments to be appended to the declarations they document instead of prepended ? People usually put comments on top of (i.e. before) declarations, and thus we use a special sign for the exceptional case where this is not the case. If for you the exception is the rule you can certainly use a processor that reattaches all comments to the previous declaration, i.e. which does the same thing as 'Previous', but isn't triggered by the '<' special character. Whether you mark up your comments in a special way is really up to you. Synopsis was designed to adjust to you, not the other way around. Regards, Stefan