From 6fbed51ef1eefc1f54d30f702a6fd179d0d56ec3 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Wed, 11 Jul 2012 17:27:50 +0200 Subject: [PATCH] d3dcompiler: Make declaration_statement return a list. --- dlls/d3dcompiler_43/hlsl.y | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index b4c9b258f07..03aa4ebba7f 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -251,6 +251,7 @@ static unsigned int components_count_expr_list(struct list *list) %type boolean %type base_type %type type +%type declaration_statement %type complex_initializer %type initializer_expr_list %type initializer_expr @@ -530,6 +531,8 @@ base_type: KW_VOID declaration_statement: declaration { + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); } declaration: var_modifiers type variables_def ';' @@ -713,8 +716,7 @@ statement_list: statement statement: declaration_statement { - $$ = d3dcompiler_alloc(sizeof(*$$)); - list_init($$); + $$ = $1; } | expr_statement {