summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-10-27 11:55:16 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-10-27 11:55:16 (GMT)
commitc38a6fe88ceb3658ae4c09fa9550c770195d9401 (patch)
treefdb8fc8a81b7046b009a6058f8bd755073c4a1c3 /src/pyscanner.l
parent560bd4f390b6f5ed3146ddd3def583bd074c35b9 (diff)
downloadDoxygen-c38a6fe88ceb3658ae4c09fa9550c770195d9401.zip
Doxygen-c38a6fe88ceb3658ae4c09fa9550c770195d9401.tar.gz
Doxygen-c38a6fe88ceb3658ae4c09fa9550c770195d9401.tar.bz2
Changed ArgumentList to be an STL container
Diffstat (limited to 'src/pyscanner.l')
-rw-r--r--src/pyscanner.l24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l
index ee72c7c..1a3f052 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -378,7 +378,7 @@ static void searchFoundDef()
current->type.resize(0);
current->name.resize(0);
current->args.resize(0);
- current->argList->clear();
+ current->argList.clear();
g_packageCommentAllowed = FALSE;
gstat=FALSE;
//printf("searchFoundDef at=%d\n",yyLineNr);
@@ -387,7 +387,7 @@ static void searchFoundDef()
static void searchFoundClass()
{
current->section = Entry::CLASS_SEC;
- current->argList->clear();
+ current->argList.clear();
current->type += "class" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
@@ -928,6 +928,10 @@ STARTDOCSYMS "##"
BEGIN(FunctionParams);
}
")" { // end of parameter list
+ if (current->argList.empty())
+ {
+ current->argList.noParameters=TRUE;
+ }
current->args = argListToString(current->argList);
g_funcParamsEnd = TRUE;
}
@@ -942,10 +946,10 @@ STARTDOCSYMS "##"
}
{IDENTIFIER} { // Name of parameter
lineCount();
- Argument *a = new Argument;
- current->argList->append(a);
- current->argList->getLast()->name = QCString(yytext).stripWhiteSpace();
- current->argList->getLast()->type = g_argType;
+ Argument a;
+ a.name = QCString(yytext).stripWhiteSpace();
+ a.type = g_argType;
+ current->argList.push_back(a);
g_argType = "";
}
"=" { // default value
@@ -1032,8 +1036,8 @@ STARTDOCSYMS "##"
"," {
if (g_braceCount == 0)
{
- if (current->argList->getLast())
- current->argList->getLast()->type += g_defVal.data();
+ if (!current->argList.empty())
+ current->argList.back().type += g_defVal;
if (*yytext != ',')
unput(*yytext);
BEGIN(FunctionParams);
@@ -1082,8 +1086,8 @@ STARTDOCSYMS "##"
"," {
if (g_braceCount == 0)
{
- if (current->argList->getLast())
- current->argList->getLast()->defval=QCString(g_defVal.data()).stripWhiteSpace();
+ if (!current->argList.empty())
+ current->argList.back().defval=QCString(g_defVal).stripWhiteSpace();
if (*yytext == ')')
unput(*yytext);
BEGIN(FunctionParams);