mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 23:32:02 +00:00
Don't accept function params starting with a comma
- Fixed: func_expr_list would accept nonsense like this: Myfunction(, 1, 2);
This commit is contained in:
parent
aadd4e4de6
commit
46c0127ebb
1 changed files with 7 additions and 2 deletions
|
@ -991,17 +991,22 @@ expr_list(X) ::= expr_list(A) COMMA expr(B).
|
||||||
* but once you do that, all remaining parameters must also be named.
|
* but once you do that, all remaining parameters must also be named.
|
||||||
* We let higher-level code handle this to keep this file simpler. */
|
* We let higher-level code handle this to keep this file simpler. */
|
||||||
%type func_expr_list{ZCC_FuncParm *}
|
%type func_expr_list{ZCC_FuncParm *}
|
||||||
|
%type func_expr_list1{ZCC_FuncParm *}
|
||||||
%type named_expr{ZCC_FuncParm *}
|
%type named_expr{ZCC_FuncParm *}
|
||||||
|
|
||||||
func_expr_list(X) ::= .
|
func_expr_list(X) ::= .
|
||||||
{
|
{
|
||||||
X = NULL;
|
X = NULL;
|
||||||
}
|
}
|
||||||
func_expr_list(X) ::= named_expr(A).
|
func_expr_list(X) ::= func_expr_list1(A).
|
||||||
{
|
{
|
||||||
X = A;
|
X = A;
|
||||||
}
|
}
|
||||||
func_expr_list(X) ::= func_expr_list(A) COMMA named_expr(B).
|
func_expr_list1(X) ::= named_expr(A).
|
||||||
|
{
|
||||||
|
X = A;
|
||||||
|
}
|
||||||
|
func_expr_list1(X) ::= func_expr_list1(A) COMMA named_expr(B).
|
||||||
{
|
{
|
||||||
X = A;
|
X = A;
|
||||||
A->AppendSibling(B);
|
A->AppendSibling(B);
|
||||||
|
|
Loading…
Reference in a new issue