mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-02-14 03:13:03 +00:00
chore: use CommonTechset instead of TechsetDefinition
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#include "TechniqueNoScopeSequences.h"
|
||||
|
||||
#include "Parsing/Simple/Matcher/SimpleMatcherFactory.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
using namespace techset;
|
||||
|
||||
namespace techset
|
||||
{
|
||||
class SequencePass final : public TechniqueParser::sequence_t
|
||||
{
|
||||
public:
|
||||
SequencePass()
|
||||
{
|
||||
const SimpleMatcherFactory create(this);
|
||||
|
||||
AddMatchers({
|
||||
create.Char('{'),
|
||||
});
|
||||
}
|
||||
|
||||
protected:
|
||||
void ProcessMatch(TechniqueParserState* state, SequenceResult<SimpleParserValue>& result) const override
|
||||
{
|
||||
assert(state->m_in_pass == false);
|
||||
state->m_in_pass = true;
|
||||
|
||||
state->m_acceptor->AcceptNextPass();
|
||||
}
|
||||
};
|
||||
} // namespace techset
|
||||
|
||||
const std::vector<TechniqueParser::sequence_t*>& TechniqueNoScopeSequences::GetSequences()
|
||||
{
|
||||
static std::vector<TechniqueParser::sequence_t*> tests({
|
||||
new SequencePass(),
|
||||
});
|
||||
|
||||
return tests;
|
||||
}
|
||||
Reference in New Issue
Block a user