Skip to content
Snippets Groups Projects
Commit e851bf21 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard
Browse files

d3dcompiler: Parse some postfix operators.

parent 74f67ba8
Branches
Tags
No related merge requests found
......@@ -920,6 +920,26 @@ postfix_expr: primary_expr
{
$$ = $1;
}
| postfix_expr OP_INC
{
struct hlsl_ir_node *operands[3];
struct source_location loc;
operands[0] = $1;
operands[1] = operands[2] = NULL;
set_location(&loc, &@2);
$$ = &new_expr(HLSL_IR_BINOP_POSTINC, operands, &loc)->node;
}
| postfix_expr OP_DEC
{
struct hlsl_ir_node *operands[3];
struct source_location loc;
operands[0] = $1;
operands[1] = operands[2] = NULL;
set_location(&loc, &@2);
$$ = &new_expr(HLSL_IR_BINOP_POSTDEC, operands, &loc)->node;
}
/* "var_modifiers" doesn't make sense in this case, but it's needed
in the grammar to avoid shift/reduce conflicts. */
| var_modifiers type '(' initializer_expr_list ')'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment