Shader: Fix nested blocks parsing

This commit is contained in:
Jérôme Leclercq 2021-07-08 10:52:29 +02:00
parent 5aa63831e8
commit 838063c8b6
1 changed files with 1 additions and 2 deletions

View File

@ -625,8 +625,6 @@ namespace Nz::ShaderLang
LeaveScope();
Expect(Advance(), TokenType::ClosingCurlyBracket);
auto func = ShaderBuilder::DeclareFunction(std::move(functionName), std::move(parameters), std::move(functionBody), std::move(returnType));
ShaderAst::AttributeValue<bool> condition;
@ -853,6 +851,7 @@ namespace Nz::ShaderLang
ExpectNot(Peek(), TokenType::EndOfStream);
statements.push_back(ParseStatement());
}
Consume(); //< Consume closing curly bracket
LeaveScope();