summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/code.l14
-rw-r--r--src/docparser.cpp18
-rw-r--r--src/doctokenizer.l4
-rw-r--r--src/xmldocvisitor.cpp16
4 files changed, 30 insertions, 22 deletions
diff --git a/src/code.l b/src/code.l
index bd1a4a6..9dc4e05 100644
--- a/src/code.l
+++ b/src/code.l
@@ -2178,12 +2178,6 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_type.resize(0);
BEGIN(g_memCallContext);
}
-<MemberCall>[^a-z_A-Z0-9(\n] {
- g_code->codify(yytext);
- g_type.resize(0);
- g_name.resize(0);
- BEGIN(g_memCallContext);
- }
<Body>[,=;\[] {
if (g_insideObjC && *yytext=='[')
{
@@ -2394,7 +2388,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_code->codify(yytext);
g_parmType.resize(0);g_parmName.resize(0);
}
-<MemberCall2,FuncCall>")" {
+<MemberCall,MemberCall2,FuncCall>")" {
g_theVarContext.addVariable(g_parmType,g_parmName);
g_theCallContext.popScope();
g_theCallContext.setClass(0);
@@ -2638,6 +2632,12 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<RemoveSpecialCComment>"//"|"/*"
<RemoveSpecialCComment>\n { g_yyLineNr++; }
<RemoveSpecialCComment>.
+<MemberCall>[^a-z_A-Z0-9(\n] {
+ g_code->codify(yytext);
+ g_type.resize(0);
+ g_name.resize(0);
+ BEGIN(g_memCallContext);
+ }
<*>\n({B}*"//"[!/][^\n]*\n)+ { // remove special one-line comment
if (Config_getBool("STRIP_CODE_COMMENTS"))
{
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 74aa938..497f595 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -372,11 +372,12 @@ static void detectNoDocumentedParams()
if (!g_memberDef->hasDocumentedParams() &&
g_hasParamCommand)
{
+ //printf("%s->setHasDocumentedParams(TRUE);\n",g_memberDef->name().data());
g_memberDef->setHasDocumentedParams(TRUE);
}
else if (!g_memberDef->hasDocumentedParams())
{
- bool allDoc=TRUE;
+ bool allDoc=TRUE; // no paramater => all parameters are documented
if ( // member has parameters
al && // but the member has a parameter list
al->count()>0 // with at least one parameter (that is not void)
@@ -388,8 +389,12 @@ static void detectNoDocumentedParams()
// see if all parameters have documentation
for (ali.toFirst();(a=ali.current()) && allDoc;++ali)
{
- allDoc = !a->docs.isEmpty();
- //printf("a->name=%s doc=%s\n",a->name.data(),a->docs.data());
+ if (!a->name.isEmpty() && a->type!="void")
+ {
+ allDoc = !a->docs.isEmpty();
+ }
+ //printf("a->type=%s a->name=%s doc=%s\n",
+ // a->type.data(),a->name.data(),a->docs.data());
}
if (!allDoc && declAl) // try declaration arguments as well
{
@@ -398,16 +403,19 @@ static void detectNoDocumentedParams()
Argument *a;
for (ali.toFirst();(a=ali.current()) && allDoc;++ali)
{
- allDoc = !a->docs.isEmpty();
+ if (!a->name.isEmpty() && a->type!="void")
+ {
+ allDoc = !a->docs.isEmpty();
+ }
//printf("a->name=%s doc=%s\n",a->name.data(),a->docs.data());
}
}
}
if (allDoc)
{
+ //printf("%s->setHasDocumentedParams(TRUE);\n",g_memberDef->name().data());
g_memberDef->setHasDocumentedParams(TRUE);
}
-
}
//printf("Member %s hasReturnCommand=%d\n",g_memberDef->name().data(),g_hasReturnCommand);
if (!g_memberDef->hasDocumentedReturnType() && // docs not yet found
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 35c166c..ff0beef 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -279,7 +279,7 @@ OPTSTARS ("//"{BLANK}*)?"*"*{BLANK}*
LISTITEM {BLANK}*{OPTSTARS}"-"("#")?{WS}
ENDLIST {BLANK}*{OPTSTARS}"."{BLANK}*\n
ATTRIB {ID}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'"><]+))?
-URLCHAR [a-z_A-Z0-9\!\~\:\;\'\$\?\@\&\%\#\.\-\+\/\=]
+URLCHAR [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=]
URLMASK (([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+))([({]{URLCHAR}*[)}])?
FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+]
FILEECHAR [a-z_A-Z0-9\-\+]
@@ -675,7 +675,7 @@ REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID}{FUNCARG}?
unput(' ');
return 0;
}
-<St_Ref>{BLANK}+"\"" {
+<St_Ref>{WS}+"\"" {
BEGIN(St_Ref2);
}
<St_Ref>\n {
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index a4cb16a..bee6298 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -125,25 +125,25 @@ void XmlDocVisitor::visit(DocStyleChange *s)
switch (s->style())
{
case DocStyleChange::Bold:
- if (s->enable()) m_t << "<bold>"; else m_t << "</bold> ";
+ if (s->enable()) m_t << "<bold>"; else m_t << "</bold>";
break;
case DocStyleChange::Italic:
- if (s->enable()) m_t << "<emphasis>"; else m_t << "</emphasis> ";
+ if (s->enable()) m_t << "<emphasis>"; else m_t << "</emphasis>";
break;
case DocStyleChange::Code:
- if (s->enable()) m_t << "<computeroutput>"; else m_t << "</computeroutput> ";
+ if (s->enable()) m_t << "<computeroutput>"; else m_t << "</computeroutput>";
break;
case DocStyleChange::Subscript:
- if (s->enable()) m_t << "<subscript>"; else m_t << "</subscript> ";
+ if (s->enable()) m_t << "<subscript>"; else m_t << "</subscript>";
break;
case DocStyleChange::Superscript:
- if (s->enable()) m_t << "<superscript>"; else m_t << "</superscript> ";
+ if (s->enable()) m_t << "<superscript>"; else m_t << "</superscript>";
break;
case DocStyleChange::Center:
- if (s->enable()) m_t << "<center>"; else m_t << "</center> ";
+ if (s->enable()) m_t << "<center>"; else m_t << "</center>";
break;
case DocStyleChange::Small:
- if (s->enable()) m_t << "<small>"; else m_t << "</small> ";
+ if (s->enable()) m_t << "<small>"; else m_t << "</small>";
break;
case DocStyleChange::Preformatted:
if (s->enable())
@@ -153,7 +153,7 @@ void XmlDocVisitor::visit(DocStyleChange *s)
}
else
{
- m_t << "</preformatted> ";
+ m_t << "</preformatted>";
m_insidePre=FALSE;
}
break;