summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-07-31 11:06:38 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-07-31 11:06:38 (GMT)
commit61a987f886200cc62a786c3bd558f428062cf529 (patch)
treee26e68937cee21e01ebbc60a39d60bc0b9559506 /src
parent28c10b0c9f4d4ebf1d9ac105241033eaf6fde228 (diff)
downloadDoxygen-61a987f886200cc62a786c3bd558f428062cf529.zip
Doxygen-61a987f886200cc62a786c3bd558f428062cf529.tar.gz
Doxygen-61a987f886200cc62a786c3bd558f428062cf529.tar.bz2
issue 7068: "QGDict::hashAsciiKey: Invalid null key" error messages (part 2)
Diffstat (limited to 'src')
-rw-r--r--src/doxygen.cpp4
-rw-r--r--src/scanner.l24
-rw-r--r--src/util.cpp4
3 files changed, 22 insertions, 10 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 6f59411..18936fa 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -3650,9 +3650,9 @@ static void buildFunctionList(Entry *root)
)
{
GroupDef *gd=0;
- if (root->groups->getFirst()!=0)
+ if (root->groups->getFirst() && !root->groups->getFirst()->groupname.isEmpty())
{
- gd = Doxygen::groupSDict->find(root->groups->getFirst()->groupname.data());
+ gd = Doxygen::groupSDict->find(root->groups->getFirst()->groupname);
}
//printf("match!\n");
//printf("mnd=%p rnd=%p nsName=%s rnsName=%s\n",mnd,rnd,nsName.data(),rnsName.data());
diff --git a/src/scanner.l b/src/scanner.l
index 13abcbb..1b948dd 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -614,6 +614,7 @@ PRE [pP][rR][eE]
CODE [cC][oO][dD][eE]
CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
+PHPUSEKW ("public"|"private"|"protected")
IDLATTR ("["[^\]]*"]"){BN}*
TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
@@ -867,12 +868,6 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<FindMembersPHP>. { // Non-PHP code text, ignore
}
-<FindMembers>"?>"|"</script>" { // PHP code end
- if (insidePHP)
- BEGIN( FindMembersPHP );
- else
- REJECT;
- }
<FindMembers>{PHPKW} { if (insidePHP)
BEGIN( NextSemi );
else
@@ -2012,6 +2007,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<PHPUseAs>{BN}+"as"{BN}+ {
lineCount();
}
+<PHPUseAs>{PHPUSEKW} {
+ }
<PHPUseAs>{ID} {
//printf("PHP: adding use as relation: %s->%s\n",yytext,aliasName.data());
if (!aliasName.isEmpty())
@@ -2319,6 +2316,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<CopyHereDocEnd>\n {
*pCopyHereDocGString += yytext;
}
+<CopyHereDocEnd>{ID} {
+ *pCopyHereDocGString += yytext;
+ }
<CopyHereDocEnd>. {
*pCopyHereDocGString += yytext;
}
@@ -5380,7 +5380,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
lineCount();
//addToBody(yytext);
}
-<SkipCurly,SkipCurlyCpp>"<<<" {
+<SkipCurly,SkipCurlyCpp,ReadInitializer>"<<<" {
if (!insidePHP)
{
REJECT;
@@ -6885,7 +6885,6 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
- /* ------------ Generic rules -------------- */
<SkipCxxComment>.*"\\\n" { // line continuation
@@ -6903,6 +6902,15 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<SkipComment>[^\*\n]+
+ /* ------------ Generic rules -------------- */
+
+<*>"?>"|"</script>" { // PHP code end
+ if (insidePHP)
+ BEGIN( FindMembersPHP );
+ else
+ REJECT;
+ }
+
<*>"[[" { // C++11 attribute
if (!insideCpp) REJECT;
if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
diff --git a/src/util.cpp b/src/util.cpp
index 695a52c..163bb23 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -4564,6 +4564,10 @@ static bool getScopeDefs(const char *docScope,const char *scope,
scopeName=scopeName.right(scopeName.length()-2);
explicitGlobalScope=TRUE;
}
+ if (scopeName.isEmpty())
+ {
+ return FALSE;
+ }
QCString docScopeName=docScope;
int scopeOffset=explicitGlobalScope ? 0 : docScopeName.length();