tint: Add sem::Expression
A new base class for sem::ValueExpression, which other types of
expression can derive from.
Example: sem::TypeExpression - an expression that resolves to a type.
Bug: tint:1810
Change-Id: I90dfb66b265b67d9fdf0c04eb3dce2442c7e18ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118404
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/sem/value_expression.cc b/src/tint/sem/value_expression.cc
index de3c4cf..9fe4615 100644
--- a/src/tint/sem/value_expression.cc
+++ b/src/tint/sem/value_expression.cc
@@ -30,11 +30,10 @@
const constant::Value* constant,
bool has_side_effects,
const Variable* root_ident /* = nullptr */)
- : declaration_(declaration),
+ : Base(declaration, statement),
root_identifier_(root_ident),
type_(type),
stage_(stage),
- statement_(statement),
constant_(std::move(constant)),
has_side_effects_(has_side_effects) {
TINT_ASSERT(Semantic, type_);