From 7171bbba9259bc7d22e09454ca9d7381d13c94e2 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 9 Nov 2020 18:40:58 +0100 Subject: Doxygen crashes on Fortran When having a Fortran file like: ``` !> module docu MODULE test_mod INTERFACE !> @brief iets SUBROUTINE subr_i(this) INTEGER this END SUBROUTINE subr_i END INTERFACE !< @brief type brief TYPE, PUBLIC :: test_type !> docu integer i END TYPE test_type END MODULE test_mod ``` this is due to the fact that a incorrect start of comment `!<` is used for the `TYPE` and that initiated because the last `SUBROUTINE` argument does not have any documentation. The actual cause is that at the end of a subroutine the `vtype` is not properly reset. --- src/fortranscanner.l | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fortranscanner.l b/src/fortranscanner.l index dfca1f8..6b581d2 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -774,6 +774,7 @@ private { yyterminate(); } yyextra->subrCurrent.pop_back(); + yyextra->vtype = V_IGNORE; yy_pop_state(yyscanner) ; } { -- cgit v0.12