mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-09 22:38:06 -05:00
Fix issues with technique parser
This commit is contained in:
@ -99,6 +99,7 @@ namespace techset
|
||||
const SimpleMatcherFactory create(this);
|
||||
|
||||
AddMatchers({
|
||||
create.Identifier().Capture(CAPTURE_FIRST_TOKEN).NoConsume(),
|
||||
create.Identifier().Capture(CAPTURE_SHADER_ARGUMENT),
|
||||
create.Optional(create.And({
|
||||
create.Char('['),
|
||||
@ -170,7 +171,6 @@ namespace techset
|
||||
void ProcessMatch(TechniqueParserState* state, SequenceResult<SimpleParserValue>& result) const override
|
||||
{
|
||||
assert(state->m_in_shader == true);
|
||||
state->m_in_shader = false;
|
||||
|
||||
const auto& shaderArgumentNameToken = result.NextCapture(CAPTURE_SHADER_ARGUMENT);
|
||||
|
||||
@ -200,7 +200,8 @@ namespace techset
|
||||
const std::vector<TechniqueParser::sequence_t*>& TechniqueShaderScopeSequences::GetSequences()
|
||||
{
|
||||
static std::vector<TechniqueParser::sequence_t*> tests({
|
||||
new SequenceEndShader()
|
||||
new SequenceEndShader(),
|
||||
new SequenceShaderArgument()
|
||||
});
|
||||
|
||||
return tests;
|
||||
|
@ -23,7 +23,7 @@ bool TechniqueFileReader::ReadTechniqueDefinition() const
|
||||
lexerConfig.m_emit_new_line_tokens = false;
|
||||
lexerConfig.m_read_strings = true;
|
||||
lexerConfig.m_read_integer_numbers = true;
|
||||
lexerConfig.m_read_floating_point_numbers = true;
|
||||
lexerConfig.m_read_floating_point_numbers = false;
|
||||
const auto lexer = std::make_unique<SimpleLexer>(m_comment_proxy.get(), std::move(lexerConfig));
|
||||
|
||||
const auto parser = std::make_unique<TechniqueParser>(lexer.get(), m_acceptor);
|
||||
|
Reference in New Issue
Block a user