diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2008-02-10 12:31:40 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2008-02-10 12:31:40 (GMT) |
commit | b8ff687873e37d7cf0f4e7df0fd7da3660f1999c (patch) | |
tree | b6882cdef0c60182168c8c11e298dcd76cc02bbc /src/docparser.cpp | |
parent | 0e922bf35ccff96ec03f22df607f3b44303206eb (diff) | |
download | Doxygen-b8ff687873e37d7cf0f4e7df0fd7da3660f1999c.zip Doxygen-b8ff687873e37d7cf0f4e7df0fd7da3660f1999c.tar.gz Doxygen-b8ff687873e37d7cf0f4e7df0fd7da3660f1999c.tar.bz2 |
Release-1.5.5
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r-- | src/docparser.cpp | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp index 529d0e7..63ff330 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -162,7 +162,7 @@ static void docParserPushContext() g_parserStack.push(ctx); } -static void docParserPopContext() +static void docParserPopContext(bool keepParamInfo=FALSE) { DocParserContext *ctx = g_parserStack.pop(); g_context = ctx->context; @@ -175,10 +175,13 @@ static void docParserPopContext() g_fileName = ctx->fileName; g_relPath = ctx->relPath; - g_hasParamCommand = ctx->hasParamCommand; - g_hasReturnCommand = ctx->hasReturnCommand; + if (!keepParamInfo) + { + g_hasParamCommand = ctx->hasParamCommand; + g_hasReturnCommand = ctx->hasReturnCommand; + g_paramsFound = ctx->paramsFound; + } g_memberDef = ctx->memberDef; - g_paramsFound = ctx->paramsFound; g_isExample = ctx->isExample; g_exampleName = ctx->exampleName; g_sectionDict = ctx->sectionDict; @@ -1754,6 +1757,8 @@ void DocCopy::parse() g_copyStack.append(def); // make sure the descriptions end with a newline, so the parser will correctly // handle them in all cases. + //printf("doc='%s'\n",doc.data()); + //printf("brief='%s'\n",brief.data()); brief+='\n'; doc+='\n'; internalValidatingParseDoc(this,m_children,brief); @@ -1761,7 +1766,7 @@ void DocCopy::parse() g_copyStack.remove(def); ASSERT(g_styleStack.isEmpty()); ASSERT(g_nodeStack.isEmpty()); - docParserPopContext(); + docParserPopContext(TRUE); } else // oops, recursion { @@ -4001,6 +4006,7 @@ int DocParamList::parseXml(const QString ¶mName) } while (retval==RetVal_CloseXml && Mappers::htmlTagMapper->map(g_token->name)!=XML_PARAM && + Mappers::htmlTagMapper->map(g_token->name)!=XML_TYPEPARAM && Mappers::htmlTagMapper->map(g_token->name)!=XML_EXCEPTION); @@ -4419,7 +4425,7 @@ void DocPara::handleInheritDoc() internalValidatingParseDoc(this,m_children,reMd->briefDescription()); internalValidatingParseDoc(this,m_children,reMd->documentation()); g_copyStack.remove(reMd); - docParserPopContext(); + docParserPopContext(TRUE); g_memberDef = thisMd; } } @@ -4641,6 +4647,9 @@ int DocPara::handleCommand(const QString &cmdName) case CMD_PARAM: retval = handleParamSection(cmdName,DocParamSect::Param,FALSE,g_token->paramDir); break; + case CMD_TPARAM: + retval = handleParamSection(cmdName,DocParamSect::TemplateParam,FALSE,g_token->paramDir); + break; case CMD_RETVAL: retval = handleParamSection(cmdName,DocParamSect::RetVal); break; @@ -5012,11 +5021,14 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag handleStyleEnter(this,m_children,DocStyleChange::Code,&g_token->attribs); break; case XML_PARAM: + case XML_TYPEPARAM: { QString paramName; if (findAttribute(tagHtmlAttribs,"name",¶mName)) { - retval = handleParamSection(paramName,DocParamSect::Param,TRUE); + retval = handleParamSection(paramName, + tagId==XML_PARAM ? DocParamSect::Param : DocParamSect::TemplateParam, + TRUE); } else { @@ -5025,6 +5037,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag } break; case XML_PARAMREF: + case XML_TYPEPARAMREF: { QString paramName; if (findAttribute(tagHtmlAttribs,"name",¶mName)) @@ -5037,7 +5050,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Missing 'name' attribute from <paramref> tag."); + warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Missing 'name' attribute from <param%sref> tag.",tagId==XML_PARAMREF?"":"type"); } } break; @@ -5330,6 +5343,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName) case XML_LIST: case XML_EXAMPLE: case XML_PARAM: + case XML_TYPEPARAM: case XML_RETURNS: case XML_SEEALSO: case XML_EXCEPTION: @@ -5344,6 +5358,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName) case XML_PERMISSION: case XML_DESCRIPTION: case XML_PARAMREF: + case XML_TYPEPARAMREF: // These tags are defined in .Net but are currently unsupported break; case HTML_UNKNOWN: |