mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 23:52:22 +00:00
handle -ve constants
This commit is contained in:
parent
1fd4590212
commit
1eef491c1c
1 changed files with 8 additions and 4 deletions
|
@ -425,30 +425,34 @@ const
|
|||
$$->type = ex_float;
|
||||
$$->e.float_val = $1;
|
||||
}
|
||||
| STRING_VAL {}
|
||||
| STRING_VAL
|
||||
{
|
||||
$$ = new_expr ();
|
||||
$$->type = ex_string;
|
||||
$$->e.string_val = $1;
|
||||
}
|
||||
| VECTOR_VAL {}
|
||||
| VECTOR_VAL
|
||||
{
|
||||
$$ = new_expr ();
|
||||
$$->type = ex_vector;
|
||||
memcpy ($$->e.vector_val, $1, sizeof ($$->e.vector_val));
|
||||
}
|
||||
| QUATERNION_VAL {}
|
||||
| QUATERNION_VAL
|
||||
{
|
||||
$$ = new_expr ();
|
||||
$$->type = ex_quaternion;
|
||||
memcpy ($$->e.quaternion_val, $1, sizeof ($$->e.quaternion_val));
|
||||
}
|
||||
| INT_VAL {}
|
||||
| INT_VAL
|
||||
{
|
||||
$$ = new_expr ();
|
||||
$$->type = ex_int;
|
||||
$$->e.int_val = $1;
|
||||
}
|
||||
| '-' const
|
||||
{
|
||||
$$ = unary_expr ('-', $2);
|
||||
}
|
||||
;
|
||||
|
||||
%%
|
||||
|
|
Loading…
Reference in a new issue