summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-05-07 19:20:23 (GMT)
committerGitHub <noreply@github.com>2019-05-07 19:20:23 (GMT)
commit80bcb700045047a67b580fd1c3df3f47992e2d64 (patch)
treef45abcbc3de9675dc328b1acb9b12fee2b22116b /src
parent6f33807a19df2012a7d1eed8871510bc6dbd46b8 (diff)
parent80e57e7490f899e64a1f931afb93fa900bc9e221 (diff)
downloadDoxygen-80bcb700045047a67b580fd1c3df3f47992e2d64.zip
Doxygen-80bcb700045047a67b580fd1c3df3f47992e2d64.tar.gz
Doxygen-80bcb700045047a67b580fd1c3df3f47992e2d64.tar.bz2
Merge pull request #6931 from albert-github/feature/bug_ftn_type
Windows crash in case of incorrect end statement
Diffstat (limited to 'src')
-rw-r--r--src/fortranscanner.l10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index 47da514..0ad03e3 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -698,6 +698,14 @@ private {
typeMode = false;
yy_pop_state();
}
+^{BS}"end"{BS}/(\n|!|;) { /* incorrect end type definition */
+ warn(yyFileName,yyLineNr, "Found 'END' instead of 'END TYPE'");
+ last_entry->parent()->endBodyLine = yyLineNr;
+ if (!endScope(current_root))
+ yyterminate();
+ typeMode = false;
+ yy_pop_state();
+ }
}
/*------- module/global/typedef variable ---------------------------------------------------*/
@@ -2819,7 +2827,7 @@ static void scanner_abort()
// dummy call to avoid compiler warning
(void)yy_top_state();
-
+
return;
//exit(-1);
}