Commit 6ccbccbb authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dcompiler: Stub assignment parsing.

parent fbb7e20f
......@@ -912,6 +912,21 @@ enum parse_unary_op
UNARY_OP_BITNOT,
};
enum parse_assign_op
{
ASSIGN_OP_ASSIGN,
ASSIGN_OP_ADD,
ASSIGN_OP_SUB,
ASSIGN_OP_MUL,
ASSIGN_OP_DIV,
ASSIGN_OP_MOD,
ASSIGN_OP_LSHIFT,
ASSIGN_OP_RSHIFT,
ASSIGN_OP_AND,
ASSIGN_OP_OR,
ASSIGN_OP_XOR,
};
struct hlsl_parse_ctx
{
const char **source_files;
......
......@@ -207,6 +207,7 @@ static unsigned int components_count_expr_list(struct list *list)
struct parse_parameter parameter;
struct parse_variable_def *variable_def;
enum parse_unary_op unary_op;
enum parse_assign_op assign_op;
}
%token KW_BLENDSTATE
......@@ -352,6 +353,7 @@ static unsigned int components_count_expr_list(struct list *list)
%type <instr> assignment_expr
%type <list> expr_statement
%type <unary_op> unary_op
%type <assign_op> assign_op
%type <modifiers> input_mod
%%
......@@ -1209,6 +1211,55 @@ assignment_expr: conditional_expr
{
$$ = $1;
}
| unary_expr assign_op assignment_expr
{
FIXME("Assignment\n");
}
assign_op: '='
{
$$ = ASSIGN_OP_ASSIGN;
}
| OP_ADDASSIGN
{
$$ = ASSIGN_OP_ADD;
}
| OP_SUBASSIGN
{
$$ = ASSIGN_OP_SUB;
}
| OP_MULASSIGN
{
$$ = ASSIGN_OP_MUL;
}
| OP_DIVASSIGN
{
$$ = ASSIGN_OP_DIV;
}
| OP_MODASSIGN
{
$$ = ASSIGN_OP_MOD;
}
| OP_LEFTSHIFTASSIGN
{
$$ = ASSIGN_OP_LSHIFT;
}
| OP_RIGHTSHIFTASSIGN
{
$$ = ASSIGN_OP_RSHIFT;
}
| OP_ANDASSIGN
{
$$ = ASSIGN_OP_AND;
}
| OP_ORASSIGN
{
$$ = ASSIGN_OP_OR;
}
| OP_XORASSIGN
{
$$ = ASSIGN_OP_XOR;
}
expr: assignment_expr
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment