Permalink
Browse files

Fixed issues with @parblock and added regression test case

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Jan 4, 2014
1 parent 8cfac90 commit 2ed3d33a92dbcdf0a0149c5f06909926e44cdebd
Showing with 145 additions and 1 deletion.
  1. +5 −0 src/commentscan.l
  2. +4 −0 src/docparser.cpp
  3. +1 −1 src/doctokenizer.l
  4. +103 −0 testing/054/054__parblock_8cpp.xml
  5. +32 −0 testing/054_parblock.cpp
@@ -2403,6 +2403,11 @@ static bool handleParBlock(const QCString &)
warn(yyFileName,yyLineNr,
"found \\parblock command while already in a parblock!");
}
if (!g_spaceBeforeCmd.isEmpty())
{
addOutput(g_spaceBeforeCmd);
g_spaceBeforeCmd.resize(0);
}
addOutput("@parblock ");
g_insideParBlock = TRUE;
return FALSE;
@@ -4945,6 +4945,10 @@ int DocParamSect::parse(const QCString &cmdName,bool xmlContext, Direction d)
{
retval = pl->parse(cmdName);
}
if (retval==RetVal_EndParBlock)
{
retval = RetVal_OK;
}
DBG(("DocParamSect::parse() end retval=%d\n",retval));
DocNode *n=g_nodeStack.pop();
@@ -1024,7 +1024,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{LNKWORD2}
g_token->name = types+"#"+params.mid(i);
return TK_WORD;
}
<St_Param>[^ \t\n,]+ {
<St_Param>[^ \t\n,@\\]+ {
g_token->name = yytext;
if (g_token->name.at(yyleng-1)==':')
{
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
<compounddef id="054__parblock_8cpp" kind="file">
<compoundname>054_parblock.cpp</compoundname>
<sectiondef kind="func">
<memberdef kind="function" id="054__parblock_8cpp_1a2dd0ac47f42a9994b91d34403be05fe9" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type>void</type>
<definition>void function</definition>
<argsstring>(int client, int *resource, int parblock, int *test, int p)</argsstring>
<name>function</name>
<param>
<type>int</type>
<declname>client</declname>
</param>
<param>
<type>int *</type>
<declname>resource</declname>
</param>
<param>
<type>int</type>
<declname>parblock</declname>
</param>
<param>
<type>int *</type>
<declname>test</declname>
</param>
<param>
<type>int</type>
<declname>p</declname>
</param>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>call by target-specific code to manage resources required by the client.</para>
<para>
<parameterlist kind="param">
<parameteritem>
<parameternamelist>
<parametername direction="in">client</parametername>
</parameternamelist>
<parameterdescription>
<para>ID of client requesting resource. </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="out">resource</parametername>
</parameternamelist>
<parameterdescription>
<para>Requested resource </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">parblock</parametername>
</parameternamelist>
<parameterdescription>
<para>
<parblock>
<para>This is a test for the @parblock command.</para>
<para>A list if values for the parblock param:<itemizedlist><listitem><para>Item 1. This is short one-line description.</para></listitem><listitem><para>Item 2. This is a long bullet item; sometimes they wrap on multiple lines like this one.</para></listitem></itemizedlist>
</para>
<para>This is the second paragraph description for the @parblock parameter. Always end the text inside the @parblock command with an @endparblock command. </para>
</parblock>
</para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="out">test</parametername>
</parameternamelist>
<parameterdescription>
<para>This is a test parameter for this function to see if it is included in the parameter table </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">p</parametername>
</parameternamelist>
<parameterdescription>
<para>
<parblock>
<para>First paragraph of the param description. <verbatim> Second paragraph of the param description.
</verbatim> </para>
</parblock>
</para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="054_parblock.cpp" line="32" column="1"/>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<location file="054_parblock.cpp"/>
</compounddef>
</doxygen>
@@ -0,0 +1,32 @@
// objective: test the \parblock command
// check: 054__parblock_8cpp.xml
/** @file */
/**
call by target-specific code to manage resources required by the client.
@param[in] client ID of client requesting resource.
@param[out] resource Requested resource
@param[in] parblock @parblock This is a test for the \@parblock
command.
A list if values for the parblock param:
- Item 1. This is short one-line description.
- Item 2. This is a long bullet item;
sometimes they wrap on multiple lines like this
one.
This is the second paragraph description for the
\@parblock parameter. Always end the text inside
the \@parblock command with an \@endparblock
command.
@endparblock
@param[out] test This is a test parameter for this function to see if
it is included in the parameter table
@param[in] p @parblock First paragraph of the param description.
Second paragraph of the param description.
@endparblock
*/
void function(int client,int *resource,int parblock,int *test,int p);

0 comments on commit 2ed3d33

Please sign in to comment.