Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backward documentation comments are not allowed in Fortran type-bound procedures (Origin: bugzilla #703112) #5223

Closed
doxygen opened this issue Jul 2, 2018 · 0 comments

Comments

@doxygen
Copy link
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.8.4-GIT on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2013-06-26 10:58:58 +0000, Javier Martin wrote:

Created attachment 247811
Add TypedefBodyContains as a valid context for "!<" recognition

In Fortran 2003+, type-bound procedures are specified in a CONTAINS part within the TYPE definition. Such specifications are usually single-line, because the procedure interface/definition is not given there; the PROCEDURE statement only references either an actual procedure or an abstract interface (for DEFERRED = pure virtual procedures).

Currently Doxygen does not allow such specifications to be annotated with a backwards documentation comment "!<", only with forward comments "!>". Furthermore, the contents of the would-be documentation comment are actually parsed by the program as source text because the recognition of comments as text to be ignored is explicitly disabled for comments followed by either ">" or "<".

The proposed patch adds the TypedefBodyContains context to the rule that triggers the recognition of backwards documentation comments. AFAIK, the existence of a CONTAINS part in a TYPE definition is in itself a feature of F2003+, so this change would not affect earlier code (F95-).

Example:

module m
type my_t
contains
procedure myProc1 !< This does not work, adds fake procedures instead.
!> But this does.
procedure, nopass :: myProc2 => func
procedure(abstractProc), deferred :: myProc3
end type
! Definition of an ABSTRACT INTERFACE with an abstractProc procedure goes here
contains
! Definitions of myProc1 and func go here
end module

On 2013-07-02 14:38:10 +0000, Dimitri van Heesch wrote:

Thanks, I'll include the patch in the next GIT update.

On 2013-08-23 15:04:44 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.5. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.

@doxygen doxygen closed this as completed Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant