Skip to content

Commit fc2912f

Browse files
committed
issue #10838 not recognize "*, " in python
Possibility in a function definition to have `*` as separate argument.
1 parent 85eb55d commit fc2912f

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/pyscanner.l

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,18 @@ ID [a-z_A-Z%]+{IDSYM}*
753753
}
754754
755755
<FunctionParams>{
756-
({BB}|",") {
756+
{BB} {
757+
}
758+
759+
"," {
760+
if (!yyextra->argType.isEmpty())
761+
{
762+
Argument a;
763+
a.name = "";
764+
a.type = yyextra->argType;
765+
yyextra->current->argList.push_back(a);
766+
yyextra->argType = "";
767+
}
757768
}
758769
759770
[\*]+ {
@@ -775,6 +786,14 @@ ID [a-z_A-Z%]+{IDSYM}*
775786
BEGIN(FunctionParamDefVal);
776787
}
777788
")" {
789+
if (!yyextra->argType.isEmpty())
790+
{
791+
Argument a;
792+
a.name = "";
793+
a.type = yyextra->argType;
794+
yyextra->current->argList.push_back(a);
795+
yyextra->argType = "";
796+
}
778797
unput(*yytext);
779798
BEGIN(FunctionDec);
780799
}

0 commit comments

Comments
 (0)