Matteo Bruni : d3dcompiler: Parse some postfix operators.
Alexandre Julliard
julliard at winehq.org
Fri Jul 20 15:29:59 CDT 2012
Module: wine
Branch: master
Commit: e851bf211ece772db0263a0e311744f6d4291c14
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e851bf211ece772db0263a0e311744f6d4291c14
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Fri Jul 20 16:37:37 2012 +0200
d3dcompiler: Parse some postfix operators.
---
dlls/d3dcompiler_43/hlsl.y | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
index 8dd2e70..c84736b 100644
--- a/dlls/d3dcompiler_43/hlsl.y
+++ b/dlls/d3dcompiler_43/hlsl.y
@@ -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 ')'
More information about the wine-cvs
mailing list