Shader: Add support for while loops

This commit is contained in:
Jérôme Leclercq
2021-12-16 23:10:58 +01:00
parent 07199301df
commit 0f9060c45b
22 changed files with 154 additions and 14 deletions

View File

@@ -362,6 +362,15 @@ namespace Nz::ShaderAst
ExpressionPtr returnExpr;
};
struct NAZARA_SHADER_API WhileStatement : Statement
{
NodeType GetType() const override;
void Visit(AstStatementVisitor& visitor) override;
ExpressionPtr condition;
StatementPtr body;
};
inline const ShaderAst::ExpressionType& GetExpressionType(ShaderAst::Expression& expr);
inline bool IsExpression(NodeType nodeType);
inline bool IsStatement(NodeType nodeType);