Skip to content

Commit

Permalink
issue #10838 not recognize "*, " in python
Browse files Browse the repository at this point in the history
Possibility in a function definition to have `*` as separate argument.
  • Loading branch information
albert-github committed Apr 30, 2024
1 parent 85eb55d commit fc2912f
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/pyscanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,18 @@ ID [a-z_A-Z%]+{IDSYM}*
}
<FunctionParams>{
({BB}|",") {
{BB} {
}
"," {
if (!yyextra->argType.isEmpty())
{
Argument a;
a.name = "";
a.type = yyextra->argType;
yyextra->current->argList.push_back(a);
yyextra->argType = "";
}
}
[\*]+ {
Expand All @@ -775,6 +786,14 @@ ID [a-z_A-Z%]+{IDSYM}*
BEGIN(FunctionParamDefVal);
}
")" {
if (!yyextra->argType.isEmpty())
{
Argument a;
a.name = "";
a.type = yyextra->argType;
yyextra->current->argList.push_back(a);
yyextra->argType = "";
}
unput(*yytext);
BEGIN(FunctionDec);
}
Expand Down

0 comments on commit fc2912f

Please sign in to comment.