mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Add 'braces' flag to parse initializers.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d9dc1a4554
commit
426c08eba4
@ -48,6 +48,7 @@ struct parse_initializer
|
||||
struct hlsl_ir_node **args;
|
||||
unsigned int args_count;
|
||||
struct list *instrs;
|
||||
bool braces;
|
||||
};
|
||||
|
||||
struct parse_array_sizes
|
||||
@ -3215,14 +3216,17 @@ complex_initializer:
|
||||
}
|
||||
$$.args[0] = node_from_list($1);
|
||||
$$.instrs = $1;
|
||||
$$.braces = false;
|
||||
}
|
||||
| '{' complex_initializer_list '}'
|
||||
{
|
||||
$$ = $2;
|
||||
$$.braces = true;
|
||||
}
|
||||
| '{' complex_initializer_list ',' '}'
|
||||
{
|
||||
$$ = $2;
|
||||
$$.braces = true;
|
||||
}
|
||||
|
||||
complex_initializer_list:
|
||||
@ -3260,6 +3264,7 @@ initializer_expr_list:
|
||||
}
|
||||
$$.args[0] = node_from_list($1);
|
||||
$$.instrs = $1;
|
||||
$$.braces = false;
|
||||
}
|
||||
| initializer_expr_list ',' initializer_expr
|
||||
{
|
||||
@ -3396,6 +3401,7 @@ func_arguments:
|
||||
$$.args_count = 0;
|
||||
if (!($$.instrs = make_empty_list(ctx)))
|
||||
YYABORT;
|
||||
$$.braces = false;
|
||||
}
|
||||
| initializer_expr_list
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user