mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
fix the conflicts caused by -ve constants
This commit is contained in:
parent
35f5118803
commit
4673d701c9
1 changed files with 10 additions and 6 deletions
|
@ -65,7 +65,7 @@ typedef struct {
|
|||
|
||||
%type <type> type maybe_func
|
||||
%type <def> param param_list def_item def_list def_name
|
||||
%type <expr> const expr arg_list
|
||||
%type <expr> signed_const const expr arg_list
|
||||
%type <expr> statement statements statement_block
|
||||
%type <function> begin_function
|
||||
|
||||
|
@ -199,7 +199,7 @@ param
|
|||
|
||||
opt_initializer
|
||||
: /*empty*/
|
||||
| '=' const
|
||||
| '=' signed_const
|
||||
{
|
||||
if (pr_scope) {
|
||||
def_t *imm = PR_ReuseConstant ($2, 0);
|
||||
|
@ -425,6 +425,14 @@ arg_list
|
|||
}
|
||||
;
|
||||
|
||||
signed_const
|
||||
: const
|
||||
| '-' const
|
||||
{
|
||||
$$ = unary_expr ('-', $2);
|
||||
}
|
||||
;
|
||||
|
||||
const
|
||||
: FLOAT_VAL
|
||||
{
|
||||
|
@ -456,10 +464,6 @@ const
|
|||
$$->type = ex_int;
|
||||
$$->e.int_val = $1;
|
||||
}
|
||||
| '-' const
|
||||
{
|
||||
$$ = unary_expr ('-', $2);
|
||||
}
|
||||
;
|
||||
|
||||
%%
|
||||
|
|
Loading…
Reference in a new issue