[wgsl-reader] Allow decorations on function return types
Add a return type decoration list field to ast::Function.
Bug: tint:513
Change-Id: I41c1087f21a87731eb48ec7642997da5ae7f2baa
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/44601
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/reader/wgsl/parser_impl.h b/src/reader/wgsl/parser_impl.h
index a2bf63d..080dda5 100644
--- a/src/reader/wgsl/parser_impl.h
+++ b/src/reader/wgsl/parser_impl.h
@@ -218,10 +218,12 @@
/// @param n function name
/// @param p function parameters
/// @param ret_ty function return type
+ /// @param ret_decos return type decorations
FunctionHeader(Source src,
std::string n,
ast::VariableList p,
- type::Type* ret_ty);
+ type::Type* ret_ty,
+ ast::DecorationList ret_decos);
/// Destructor
~FunctionHeader();
/// Assignment operator
@@ -237,6 +239,8 @@
ast::VariableList params;
/// Function return type
type::Type* return_type;
+ /// Function return type decorations
+ ast::DecorationList return_type_decorations;
};
/// VarDeclInfo contains the parsed information for variable declaration.