summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 4b15a2b..53f58bc 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -423,7 +423,11 @@ static bool findDocsForMemberOrCompound(const char *commandName,
NamespaceDef *nd=0;
GroupDef *gd=0;
PageInfo *pi=0;
- bool found = getDefs(g_context.latin1(),name.latin1(),args,md,cd,fd,nd,gd,FALSE,0,TRUE);
+ bool found = getDefs(
+ g_context.find('.')==-1?g_context.latin1():"", // `find('.') is a hack to detect files
+ name.latin1(),
+ args.isEmpty()?0:args.latin1(),
+ md,cd,fd,nd,gd,FALSE,0,TRUE);
if (found && md)
{
*pDoc=md->documentation();
@@ -4371,6 +4375,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
// pretty print the result
PrintDocVisitor *v = new PrintDocVisitor;
root->accept(v);
+ delete v;
}
checkUndocumentedParams();
@@ -4413,6 +4418,14 @@ DocNode *validatingParseText(const char *input)
DocText *txt = new DocText;
txt->parse();
+ if (Debug::isFlagSet(Debug::PrintTree))
+ {
+ // pretty print the result
+ PrintDocVisitor *v = new PrintDocVisitor;
+ txt->accept(v);
+ delete v;
+ }
+
delete g_token;
return txt;