Shader: Fix nested blocks parsing
This commit is contained in:
parent
5aa63831e8
commit
838063c8b6
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue