Blender V5.3
type_checker.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "symbol_class.hh"
12
13namespace bsl {
14
15using namespace blender::gpu::shader::parser;
16
22
25 /* Value if constexpr. */
27 /* Array dimension of the current temporary. */
29
31 bool is_temporary = false;
32
34 : type(var->type),
35 value(var->value),
36 array_dim(var->array_dimensions),
38 (var->is_const ? ExprFlag::IsConstant : ExprFlag::IsNone)))
39 {
40 }
41
46
54
55 bool is_constexpr() const
56 {
58 }
59
60 bool is_constant() const
61 {
63 }
64};
65
66} /* namespace bsl */
unsigned char uint8_t
Definition BKE_text.h:79
Definition codegen.cc:18
ConstexprValue ConstexprError
@ IsConstexpr
@ IsConstant
bool is_constant() const
ExpressionResult(SymbolVariable *var)
bool is_constexpr() const
ExpressionResult(SymbolClass *cls, ExprFlag flags=ExprFlag::IsNone)
ExpressionResult(SymbolClass *cls, ConstexprValue value, bool is_temporary=true)
ConstexprValue value