Update initializer names.
This Cl updates the names of the initializer expressions to be clearer.
* InitializerExpression -> ConstructorExpression
* ConstInitializerExpression -> ScalarConstructorExpression
* TypeInitializerExpression -> TypeConstructorExpression
Bug: tint:26
Change-Id: Ib046497f589cc65d1d64bc172015588348feeffe
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18340
Reviewed-by: David Neto <dneto@google.com>
diff --git a/src/writer/wgsl/generator_impl_variable_test.cc b/src/writer/wgsl/generator_impl_variable_test.cc
index 06463e8..dce656a 100644
--- a/src/writer/wgsl/generator_impl_variable_test.cc
+++ b/src/writer/wgsl/generator_impl_variable_test.cc
@@ -91,12 +91,12 @@
)");
}
-TEST_F(GeneratorImplTest, EmitVariable_Initializer) {
+TEST_F(GeneratorImplTest, EmitVariable_Constructor) {
auto ident = std::make_unique<ast::IdentifierExpression>("initializer");
ast::type::F32Type f32;
ast::Variable v("a", ast::StorageClass::kNone, &f32);
- v.set_initializer(std::move(ident));
+ v.set_constructor(std::move(ident));
GeneratorImpl g;
ASSERT_TRUE(g.EmitVariable(&v)) << g.error();
@@ -109,7 +109,7 @@
ast::type::F32Type f32;
ast::Variable v("a", ast::StorageClass::kNone, &f32);
- v.set_initializer(std::move(ident));
+ v.set_constructor(std::move(ident));
v.set_is_const(true);
GeneratorImpl g;