Shader: Fix nested blocks parsing
This commit is contained in:
@@ -625,8 +625,6 @@ namespace Nz::ShaderLang
|
|||||||
|
|
||||||
LeaveScope();
|
LeaveScope();
|
||||||
|
|
||||||
Expect(Advance(), TokenType::ClosingCurlyBracket);
|
|
||||||
|
|
||||||
auto func = ShaderBuilder::DeclareFunction(std::move(functionName), std::move(parameters), std::move(functionBody), std::move(returnType));
|
auto func = ShaderBuilder::DeclareFunction(std::move(functionName), std::move(parameters), std::move(functionBody), std::move(returnType));
|
||||||
|
|
||||||
ShaderAst::AttributeValue<bool> condition;
|
ShaderAst::AttributeValue<bool> condition;
|
||||||
@@ -853,6 +851,7 @@ namespace Nz::ShaderLang
|
|||||||
ExpectNot(Peek(), TokenType::EndOfStream);
|
ExpectNot(Peek(), TokenType::EndOfStream);
|
||||||
statements.push_back(ParseStatement());
|
statements.push_back(ParseStatement());
|
||||||
}
|
}
|
||||||
|
Consume(); //< Consume closing curly bracket
|
||||||
|
|
||||||
LeaveScope();
|
LeaveScope();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user