diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-05-07 19:20:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-07 19:20:23 (GMT) |
commit | 80bcb700045047a67b580fd1c3df3f47992e2d64 (patch) | |
tree | f45abcbc3de9675dc328b1acb9b12fee2b22116b | |
parent | 6f33807a19df2012a7d1eed8871510bc6dbd46b8 (diff) | |
parent | 80e57e7490f899e64a1f931afb93fa900bc9e221 (diff) | |
download | Doxygen-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
-rw-r--r-- | src/fortranscanner.l | 10 |
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); } |