Commit 385af337 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Merge pull request #24 from albert-github/feature/bug_706520

Bug 706520 - Fortran: in body documentation lands on wrong place
parents 54bf87c7 9ec53618
...@@ -164,7 +164,7 @@ static QList<Entry> moduleProcedures; // list of all interfaces which contai ...@@ -164,7 +164,7 @@ static QList<Entry> moduleProcedures; // list of all interfaces which contai
// module procedures // module procedures
static QCString docBlock; static QCString docBlock;
static QCString docBlockName; static QCString docBlockName;
static bool docBlockInBody; static bool docBlockInBody = FALSE;
static bool docBlockJavaStyle; static bool docBlockJavaStyle;
static MethodTypes mtype; static MethodTypes mtype;
...@@ -1085,6 +1085,7 @@ private { ...@@ -1085,6 +1085,7 @@ private {
yy_push_state(YY_START); yy_push_state(YY_START);
current->docLine = yyLineNr; current->docLine = yyLineNr;
docBlockJavaStyle = FALSE; docBlockJavaStyle = FALSE;
if (YY_START==SubprogBody) docBlockInBody = TRUE;
docBlock.resize(0); docBlock.resize(0);
docBlockJavaStyle = Config_getBool("JAVADOC_AUTOBRIEF"); docBlockJavaStyle = Config_getBool("JAVADOC_AUTOBRIEF");
startCommentBlock(TRUE); startCommentBlock(TRUE);
...@@ -2096,11 +2097,14 @@ static void startCommentBlock(bool brief) ...@@ -2096,11 +2097,14 @@ static void startCommentBlock(bool brief)
static void handleCommentBlock(const QCString &doc,bool brief) static void handleCommentBlock(const QCString &doc,bool brief)
{ {
docBlockInBody = FALSE;
bool needsEntry = FALSE; bool needsEntry = FALSE;
static bool hideInBodyDocs = Config_getBool("HIDE_IN_BODY_DOCS"); static bool hideInBodyDocs = Config_getBool("HIDE_IN_BODY_DOCS");
int position=0; int position=0;
if (docBlockInBody && hideInBodyDocs) return; if (docBlockInBody && hideInBodyDocs)
{
docBlockInBody = FALSE;
return;
}
DBG_CTX((stderr,"call parseCommentBlock [%s]\n",doc.data())); DBG_CTX((stderr,"call parseCommentBlock [%s]\n",doc.data()));
int lineNr = brief ? current->briefLine : current->docLine; int lineNr = brief ? current->briefLine : current->docLine;
while (parseCommentBlock( while (parseCommentBlock(
...@@ -2123,6 +2127,7 @@ static void handleCommentBlock(const QCString &doc,bool brief) ...@@ -2123,6 +2127,7 @@ static void handleCommentBlock(const QCString &doc,bool brief)
DBG_CTX((stderr,"parseCommentBlock position=%d [%s] needsEntry=%d\n",position,doc.data()+position,needsEntry)); DBG_CTX((stderr,"parseCommentBlock position=%d [%s] needsEntry=%d\n",position,doc.data()+position,needsEntry));
if (needsEntry) addCurrentEntry(0); if (needsEntry) addCurrentEntry(0);
docBlockInBody = FALSE;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -2132,6 +2137,10 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief) ...@@ -2132,6 +2137,10 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
QCString loc_doc; QCString loc_doc;
Entry *tmp_entry = current; Entry *tmp_entry = current;
current = subrCurrent.first(); // temporarily switch to the entry of the subroutine / function current = subrCurrent.first(); // temporarily switch to the entry of the subroutine / function
// Still in the specification section so no inbodyDocs yet, but parameter documentation
current->inbodyDocs = "";
if (docBlock.stripWhiteSpace().find("\\param") == 0) if (docBlock.stripWhiteSpace().find("\\param") == 0)
{ {
handleCommentBlock("\n\n"+doc,brief); handleCommentBlock("\n\n"+doc,brief);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment