Skip to content

Commit

Permalink
issue doxygen#9047 Support @param-taint in PHP (permit dashes in comm…
Browse files Browse the repository at this point in the history
…and aliases?)

Add the possibility to have a dash in an ALIASES.
  • Loading branch information
albert-github committed Jul 16, 2022
1 parent 6de380c commit 6222ce6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/commentcnv.l
Expand Up @@ -901,10 +901,10 @@ SLASHopt [/]*
handleCondSectionId(yyscanner," "); // fake section id causing the section to be hidden unconditionally
if (*yytext=='\n') { yyextra->lineNr++; copyToOutput(yyscanner,"\n",1);}
}
<CComment,ReadLine>[\\@][a-z_A-Z][a-z_A-Z0-9]* { // expand alias without arguments
<CComment,ReadLine>[\\@][a-z_A-Z][a-z_A-Z0-9-]* { // expand alias without arguments
replaceAliases(yyscanner,QCString(yytext));
}
<CComment,ReadLine>[\\@][a-z_A-Z][a-z_A-Z0-9]*"{" { // expand alias with arguments
<CComment,ReadLine>[\\@][a-z_A-Z][a-z_A-Z0-9-]*"{" { // expand alias with arguments
yyextra->lastBlockContext=YY_START;
yyextra->blockCount=1;
yyextra->aliasString=yytext;
Expand Down
4 changes: 2 additions & 2 deletions src/configimpl.l
Expand Up @@ -1814,8 +1814,8 @@ void Config::checkAndCorrect(bool quiet, const bool check)
for (const auto &alias : aliasList)
{
// match aliases of the form re1='name=' and re2='name{2} ='
static const reg::Ex re1(R"(^\a\w*\s*=)");
static const reg::Ex re2(R"(^\a\w*{\d+}\s*=)");
static const reg::Ex re1(R"(^\a[\w-]*\s*=)");
static const reg::Ex re2(R"(^\a[\w-]*{\d+}\s*=)");
if (!reg::search(alias,re1) && !reg::search(alias,re2))
{
err("Illegal ALIASES format '%s'. Use \"name=value\" or \"name{n}=value\", where n is the number of arguments\n",
Expand Down
2 changes: 1 addition & 1 deletion src/util.cpp
Expand Up @@ -6072,7 +6072,7 @@ static QCString escapeCommas(const QCString &s)
static QCString expandAliasRec(StringUnorderedSet &aliasesProcessed,const QCString &s,bool allowRecursion)
{
QCString result;
static const reg::Ex re(R"([\\@](\a\w*))");
static const reg::Ex re(R"([\\@](\a[\w-]*))");
std::string str = s.str();
reg::Match match;
size_t p = 0;
Expand Down

0 comments on commit 6222ce6

Please sign in to comment.