Shader: Add missing ! and != parsing

This commit is contained in:
Jérôme Leclercq
2021-08-02 11:12:56 +02:00
parent a5b71f33b9
commit ac08afe9f1
3 changed files with 24 additions and 0 deletions

View File

@@ -1117,6 +1117,14 @@ namespace Nz::ShaderLang
return ShaderBuilder::Unary(ShaderAst::UnaryType::Plus, std::move(expr));
}
case TokenType::Not:
{
Consume();
ShaderAst::ExpressionPtr expr = ParsePrimaryExpression();
return ShaderBuilder::Unary(ShaderAst::UnaryType::LogicalNot, std::move(expr));
}
case TokenType::OpenParenthesis:
return ParseParenthesisExpression();