From e4bf5933b97207f16ad377c0c7a04ef3b0b100f5 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 14 Nov 2022 19:12:54 -0600 Subject: [PATCH] vkd3d-shader/hlsl: Return a hlsl_block from the "selection_statement" rule. --- libs/vkd3d-shader/hlsl.y | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index a2f2f373..bf72117a 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -4576,7 +4576,6 @@ static void validate_texture_format_type(struct hlsl_ctx *ctx, struct hlsl_type %type postfix_expr %type primary_expr %type relational_expr -%type selection_statement %type shift_expr %type struct_declaration_without_vars %type type_specs @@ -4600,6 +4599,7 @@ static void validate_texture_format_type(struct hlsl_ctx *ctx, struct hlsl_type %type compound_statement %type loop_statement +%type selection_statement %type statement %type statement_list @@ -5929,9 +5929,6 @@ statement: $$ = list_to_block($1); } | selection_statement - { - $$ = list_to_block($1); - } | loop_statement jump_statement: @@ -5987,8 +5984,8 @@ selection_statement: "if condition type %s is not scalar.", string->buffer); hlsl_release_string_buffer(ctx, string); } - $$ = $3; - list_add_tail($$, &instr->entry); + $$ = list_to_block($3); + hlsl_block_add_instr($$, instr); } if_body: