// Copyright (C) 2016 Jérôme Leclercq // This file is part of the "Nazara Engine - Renderer module" // For conditions of distribution and use, see copyright notice in Config.hpp #include #include namespace Nz { namespace ShaderAst { inline ExpressionStatement::ExpressionStatement(ExpressionPtr expr) : expression(std::move(expr)) { } template StatementBlock::StatementBlock(Args&& ...args) : statements({std::forward(args)...}) { } inline Variable::Variable(VariableType varKind, ExpressionType varType) : kind(varKind), type(varType) { } inline NamedVariable::NamedVariable(VariableType varKind, const Nz::String& varName, ExpressionType varType) : Variable(varKind, varType), name(varName) { } inline BuiltinVariable::BuiltinVariable(Builtin variable, ExpressionType varType) : Variable(VariableType::Builtin, varType), var(variable) { } inline AssignOp::AssignOp(AssignType Op, VariablePtr Var, ExpressionPtr Right) : op(Op), variable(std::move(Var)), right(std::move(Right)) { } inline BinaryOp::BinaryOp(BinaryType Op, ExpressionPtr Left, ExpressionPtr Right) : op(Op), left(std::move(Left)), right(std::move(Right)) { } inline Branch::Branch(ExpressionPtr condition, StatementPtr trueStatement, StatementPtr falseStatement) { condStatements.emplace_back(ConditionalStatement{ std::move(condition), std::move(trueStatement) }); elseStatement = std::move(falseStatement); } inline Constant::Constant(float value) : exprType(ExpressionType::Float1) { values.vec1 = value; } } } #include