summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-08-04 17:47:31 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-08-04 17:47:31 (GMT)
commit7f0ea786de3153f535ca20280d6b8660ffefd2e6 (patch)
tree4bbcee0f68459813d3dfc5cf91810058fbd26411 /src
parent04776addb01183904c1657ec638af3e6862c5afd (diff)
downloadDoxygen-7f0ea786de3153f535ca20280d6b8660ffefd2e6.zip
Doxygen-7f0ea786de3153f535ca20280d6b8660ffefd2e6.tar.gz
Doxygen-7f0ea786de3153f535ca20280d6b8660ffefd2e6.tar.bz2
issue #7009 Python class diagram not created for the base class while works for the derived class
Diffstat (limited to 'src')
-rw-r--r--src/pyscanner.l67
1 files changed, 40 insertions, 27 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 3f98f3a..787c10a 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -95,6 +95,7 @@ static int g_stringContext;
static QGString * g_copyString;
static int g_indent = 0;
static int g_curIndent = 0;
+static bool g_importTuple;
static QDict<QCString> g_packageNameCache(257);
@@ -102,6 +103,7 @@ static char g_atomStart;
static char g_atomEnd;
static int g_atomCount;
+
//static bool g_insideConstructor;
static QCString g_moduleScope;
@@ -230,6 +232,17 @@ static QCString findPackageScope(const char *fileName)
return findPackageScopeFromPath(fi.dirPath(TRUE).data());
}
+static void addFrom(bool all)
+{
+ QCString item=all ? g_packageName : g_packageName+"."+yytext;
+ current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
+ current->fileName = yyFileName;
+ //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
+ current->section=all ? Entry::USINGDIR_SEC : Entry::USINGDECL_SEC;
+ current_root->addSubEntry(current);
+ current = new Entry ;
+ initEntry();
+}
//-----------------------------------------------------------------------------
static void lineCount()
@@ -702,45 +715,45 @@ STARTDOCSYMS "##"
<FromModItem>{
"*" { // import all
- QCString item=g_packageName;
- current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
- current->fileName = yyFileName;
- //printf("Adding using directive: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
- current->section=Entry::USINGDIR_SEC;
- current_root->addSubEntry(current);
- current = new Entry ;
- initEntry();
+ addFrom(TRUE);
BEGIN(Search);
}
{IDENTIFIER}/{B}","{B} {
- QCString item=g_packageName+"."+yytext;
- current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
- current->fileName = yyFileName;
- //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
- current->section=Entry::USINGDECL_SEC;
- current_root->addSubEntry(current);
- current = new Entry ;
- initEntry();
+ addFrom(FALSE);
}
+ {IDENTIFIER}/{B}")"
+ {
+ g_importTuple=FALSE;
+ addFrom(FALSE);
+ }
{IDENTIFIER} {
- QCString item=g_packageName+"."+yytext;
- current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
- current->fileName = yyFileName;
- //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
- current->section=Entry::USINGDECL_SEC;
- current_root->addSubEntry(current);
- current = new Entry ;
- initEntry();
- BEGIN(Search);
+ addFrom(FALSE);
+ if (!g_importTuple)
+ {
+ BEGIN(Search);
+ }
}
\n {
incLineNr();
- BEGIN(Search);
+ if (!g_importTuple)
+ {
+ BEGIN(Search);
+ }
}
{B} {
}
- "," {
+ "(" {
+ g_importTuple=TRUE;
+ }
+ ")" {
+ g_importTuple=FALSE;
+ BEGIN(Search);
+ }
+ "," {
}
+ "\\"{B}\n { // line continuation
+ incLineNr();
+ }
. {
unput(*yytext);
BEGIN(Search);