summaryrefslogtreecommitdiffstats
path: root/Source/LexerParser/cmFortranParser.y
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-29 17:35:49 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-30 11:38:36 (GMT)
commit88fb1980c3dc4dd56bbaf41cb84500520be5ab9a (patch)
tree72495cdde9ea319ca3462ff2d19e1642335326ce /Source/LexerParser/cmFortranParser.y
parent90907c8ff96ff07f0dafc1f4904d25b1e10f014b (diff)
downloadCMake-88fb1980c3dc4dd56bbaf41cb84500520be5ab9a.zip
CMake-88fb1980c3dc4dd56bbaf41cb84500520be5ab9a.tar.gz
CMake-88fb1980c3dc4dd56bbaf41cb84500520be5ab9a.tar.bz2
Fortran: Restore support for parsing "end interface X"
Since commit 219a9b1e14 (Fortran: Fix suprious dependencies with submodules, 2022-07-30, v3.25.0-rc1~327^2) we accidentally fail to recognize `end interface X`, causing all subsequent modules to be seen as an interface. Fixes: #24203
Diffstat (limited to 'Source/LexerParser/cmFortranParser.y')
-rw-r--r--Source/LexerParser/cmFortranParser.y5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/LexerParser/cmFortranParser.y b/Source/LexerParser/cmFortranParser.y
index a5c8976..0b27060 100644
--- a/Source/LexerParser/cmFortranParser.y
+++ b/Source/LexerParser/cmFortranParser.y
@@ -138,6 +138,11 @@ stmt:
cmFortranParser_SetInInterface(parser, true);
free($2);
}
+| END INTERFACE WORD EOSTMT {
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_SetInInterface(parser, false);
+ free($3);
+ }
| END INTERFACE EOSTMT {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_SetInInterface(parser, false);