mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 07:34:50 +00:00
state_call needs parenthesis around func_expr_list
- Fixed: state_call needs to enclose func_expr_list in LPAREN/RPAREN itself, because func_expr_list doesn't include them. This means it also needs a separate production to accept calls without a parameter list.
This commit is contained in:
parent
46c0127ebb
commit
0d25ed8289
1 changed files with 5 additions and 1 deletions
|
@ -256,6 +256,7 @@ enumerator(X) ::= IDENTIFIER(A) EQ expr(B). /* Expression must be constant. */
|
|||
%type state_goto_offset {ZCC_Expression *}
|
||||
%type state_action {ZCC_TreeNode *}
|
||||
%type state_call {ZCC_ExprFuncCall *}
|
||||
%type state_call_params {ZCC_FuncParm *}
|
||||
|
||||
%include {
|
||||
struct StateOpts {
|
||||
|
@ -348,7 +349,7 @@ state_action(X) ::= LBRACE error scanner_mode RBRACE. { X = NULL; }
|
|||
state_action(X) ::= state_call(A) scanner_mode SEMICOLON. { X = A; }
|
||||
|
||||
state_call(X) ::= . { X = NULL; }
|
||||
state_call(X) ::= IDENTIFIER(A) func_expr_list(B).
|
||||
state_call(X) ::= IDENTIFIER(A) state_call_params(B).
|
||||
{
|
||||
NEW_AST_NODE(ExprFuncCall, expr);
|
||||
NEW_AST_NODE(ExprID, func);
|
||||
|
@ -361,6 +362,9 @@ state_call(X) ::= IDENTIFIER(A) func_expr_list(B).
|
|||
X = expr;
|
||||
}
|
||||
|
||||
state_call_params(X) ::= . { X = NULL; }
|
||||
state_call_params(X) ::= LPAREN func_expr_list(A) RPAREN. { X = A; }
|
||||
|
||||
/* Definition of a default class instance. */
|
||||
%type default_def {ZCC_CompoundStmt *}
|
||||
default_def(X) ::= DEFAULT compound_statement(A). { X = A; }
|
||||
|
|
Loading…
Reference in a new issue