Shader: Add support for for-each statements and improve arrays

This commit is contained in:
Jérôme Leclercq
2022-01-02 22:02:11 +01:00
parent aac6e38da2
commit 4fe44339c5
30 changed files with 712 additions and 93 deletions

View File

@@ -13,6 +13,12 @@ namespace Nz::ShaderAst
return expr.cachedExpressionType.value();
}
ShaderAst::ExpressionType& GetExpressionTypeMut(ShaderAst::Expression& expr)
{
assert(expr.cachedExpressionType);
return expr.cachedExpressionType.value();
}
inline bool IsExpression(NodeType nodeType)
{
switch (nodeType)