mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
fix -expr handling. generates sucky code atm, but at least it's generating
code now:P
This commit is contained in:
parent
638cd005b0
commit
0c2cd8633c
2 changed files with 20 additions and 18 deletions
|
@ -1233,6 +1233,8 @@ emit_sub_expr (expr_t *e, def_t *dest)
|
||||||
} else {
|
} else {
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
if (!dest)
|
||||||
|
dest = PR_GetTempDef (e->e.expr.type, pr_scope);
|
||||||
op = PR_Opcode_Find (operator, priority, def_a, def_b, dest);
|
op = PR_Opcode_Find (operator, priority, def_a, def_b, dest);
|
||||||
return emit_statement (e->line, op, def_a, def_b, dest);
|
return emit_statement (e->line, op, def_a, def_b, dest);
|
||||||
case ex_def:
|
case ex_def:
|
||||||
|
|
|
@ -445,7 +445,7 @@ expr
|
||||||
| expr '(' arg_list ')' { $$ = function_expr ($1, $3); }
|
| expr '(' arg_list ')' { $$ = function_expr ($1, $3); }
|
||||||
| expr '(' ')' { $$ = function_expr ($1, 0); }
|
| expr '(' ')' { $$ = function_expr ($1, 0); }
|
||||||
| expr '.' expr { $$ = binary_expr ('.', $1, $3); }
|
| expr '.' expr { $$ = binary_expr ('.', $1, $3); }
|
||||||
| '-' expr { $$ = unary_expr ('-', $2); }
|
| '-' expr %prec '!' { $$ = unary_expr ('-', $2); }
|
||||||
| '!' expr { $$ = unary_expr ('!', $2); }
|
| '!' expr { $$ = unary_expr ('!', $2); }
|
||||||
| NAME
|
| NAME
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue