Signed-off-by: Francisco Casas fcasas@codeweavers.com
--- v5: - No changes from v4.
Signed-off-by: Francisco Casas fcasas@codeweavers.com --- libs/vkd3d-shader/hlsl.y | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 5f8841fe..34b4a8bb 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -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 @@ -3218,14 +3219,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: @@ -3259,6 +3263,7 @@ initializer_expr_list: YYABORT; $$.args[0] = node_from_list($1); $$.instrs = $1; + $$.braces = false; } | initializer_expr_list ',' initializer_expr { @@ -3395,6 +3400,7 @@ func_arguments: $$.args_count = 0; if (!($$.instrs = make_empty_list(ctx))) YYABORT; + $$.braces = false; } | initializer_expr_list
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 10/03/22 16:14, Francisco Casas ha scritto:
Signed-off-by: Francisco Casas fcasas@codeweavers.com
v5:
- No changes from v4.
Signed-off-by: Francisco Casas fcasas@codeweavers.com
libs/vkd3d-shader/hlsl.y | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 5f8841fe..34b4a8bb 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -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
@@ -3218,14 +3219,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:
@@ -3259,6 +3263,7 @@ initializer_expr_list: YYABORT; $$.args[0] = node_from_list($1); $$.instrs = $1;
$$.braces = false; } | initializer_expr_list ',' initializer_expr {
@@ -3395,6 +3400,7 @@ func_arguments: $$.args_count = 0; if (!($$.instrs = make_empty_list(ctx))) YYABORT;
$$.braces = false; } | initializer_expr_list