mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 07:34:50 +00:00
Properly pass statements around in the parser.
This commit is contained in:
parent
6088acd4c0
commit
62fb43d67a
1 changed files with 12 additions and 12 deletions
|
@ -1061,19 +1061,19 @@ constant(X) ::= FLOATCONST(A).
|
||||||
|
|
||||||
/************ Statements ************/
|
/************ Statements ************/
|
||||||
|
|
||||||
function_body ::= compound_statement.
|
function_body(X) ::= compound_statement(A). { X = A; }
|
||||||
|
|
||||||
%type statement{ZCC_Statement *}
|
%type statement{ZCC_Statement *}
|
||||||
statement ::= SEMICOLON.
|
statement(X) ::= SEMICOLON. { X = NULL; }
|
||||||
statement ::= labeled_statement.
|
statement(X) ::= labeled_statement(A). { X = A; }
|
||||||
statement ::= compound_statement.
|
statement(X) ::= compound_statement(A). { X = A; }
|
||||||
statement ::= expression_statement SEMICOLON.
|
statement(X) ::= expression_statement(A) SEMICOLON. { X = A; }
|
||||||
statement ::= selection_statement.
|
statement(X) ::= selection_statement(A). { X = A; }
|
||||||
statement ::= iteration_statement.
|
statement(X) ::= iteration_statement(A). { X = A; }
|
||||||
statement ::= jump_statement.
|
statement(X) ::= jump_statement(A). { X = A; }
|
||||||
statement ::= assign_statement SEMICOLON.
|
statement(X) ::= assign_statement(A) SEMICOLON. { X = A; }
|
||||||
statement ::= local_var SEMICOLON.
|
statement(X) ::= local_var(A) SEMICOLON. { X = A; }
|
||||||
statement ::= error SEMICOLON.
|
statement(X) ::= error SEMICOLON. { X = NULL; }
|
||||||
|
|
||||||
/*----- Jump Statements -----*/
|
/*----- Jump Statements -----*/
|
||||||
|
|
||||||
|
@ -1132,8 +1132,8 @@ statement_list(X) ::= statement(A).
|
||||||
}
|
}
|
||||||
statement_list(X) ::= statement_list(A) statement(B).
|
statement_list(X) ::= statement_list(A) statement(B).
|
||||||
{
|
{
|
||||||
|
SAFE_APPEND(A,B);
|
||||||
X = A;
|
X = A;
|
||||||
A->AppendSibling(B);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----- Expression Statements -----*/
|
/*----- Expression Statements -----*/
|
||||||
|
|
Loading…
Reference in a new issue