summaryrefslogtreecommitdiffstats
path: root/src/fortranscanner.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2015-01-01 15:20:46 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2015-01-02 09:45:19 (GMT)
commit610bdb67c4db775debf26d85091383938d946f3d (patch)
treecc5c2cee285fad58838f1e2e9afb2bff562e0d34 /src/fortranscanner.l
parent4d52beec3760244d959ab4d5528aea1acba505e7 (diff)
downloadDoxygen-610bdb67c4db775debf26d85091383938d946f3d.zip
Doxygen-610bdb67c4db775debf26d85091383938d946f3d.tar.gz
Doxygen-610bdb67c4db775debf26d85091383938d946f3d.tar.bz2
Suggestion to use stripPrefix has been implemented for RESULT.
For consistency also implemented for arguments.
Diffstat (limited to 'src/fortranscanner.l')
-rw-r--r--src/fortranscanner.l39
1 files changed, 14 insertions, 25 deletions
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index e28158f..f628c26 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -2232,14 +2232,10 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
current->inbodyDocs = "";
// strip \\param or @param, so we can do some extra checking. We will add it later on again.
- if (loc_doc.find("\\param") == 0)
- {
- loc_doc = loc_doc.right(loc_doc.length()-strlen("\\param")).stripWhiteSpace();
- }
- else if (loc_doc.find("@param") == 0)
- {
- loc_doc = loc_doc.right(loc_doc.length()-strlen("@param")).stripWhiteSpace();
- }
+ if (!loc_doc.stripPrefix("\\param") &&
+ !loc_doc.stripPrefix("@param")
+ ); // Do nothing work has been done by stripPrefix
+ loc_doc.stripWhiteSpace();
// direction as defined with the declaration of the parameter
int dir1 = modifiers[current_root][argName.lower()].direction;
@@ -2252,6 +2248,7 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
{
// strip direction
loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::IN]));
+ loc_doc.stripWhiteSpace();
// in case of emty documentation or (now) just name, consider it as no documemntation
if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower()))
{
@@ -2278,6 +2275,7 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
(directionParam[dir1] == directionParam[SymbolModifiers::OUT]))
{
loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::OUT]));
+ loc_doc.stripWhiteSpace();
if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower()))
{
current=tmp_entry;
@@ -2301,6 +2299,7 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
(directionParam[dir1] == directionParam[SymbolModifiers::INOUT]))
{
loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::INOUT]));
+ loc_doc.stripWhiteSpace();
if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower()))
{
current=tmp_entry;
@@ -2345,23 +2344,13 @@ static void subrHandleCommentBlockResult(const QCString &doc,bool brief)
// Still in the specification section so no inbodyDocs yet, but parameter documentation
current->inbodyDocs = "";
- // strip \\param or @param, so we can do some extra checking. We will add it later on again.
- if (loc_doc.find("\\returns") == 0)
- {
- loc_doc = loc_doc.right(loc_doc.length()-strlen("\\returns")).stripWhiteSpace();
- }
- else if (loc_doc.find("@returns") == 0)
- {
- loc_doc = loc_doc.right(loc_doc.length()-strlen("@returns")).stripWhiteSpace();
- }
- if (loc_doc.find("\\return") == 0)
- {
- loc_doc = loc_doc.right(loc_doc.length()-strlen("\\return")).stripWhiteSpace();
- }
- else if (loc_doc.find("@return") == 0)
- {
- loc_doc = loc_doc.right(loc_doc.length()-strlen("@return")).stripWhiteSpace();
- }
+ // strip \\returns or @returns. We will add it later on again.
+ if (!loc_doc.stripPrefix("\\returns") &&
+ !loc_doc.stripPrefix("\\return") &&
+ !loc_doc.stripPrefix("@returns") &&
+ !loc_doc.stripPrefix("@return")
+ ); // Do nothing work has been done by stripPrefix
+ loc_doc.stripWhiteSpace();
if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower()))
{