mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-07 21:38:01 -05:00
26 lines
613 B
C++
26 lines
613 B
C++
#include "SequenceGame.h"
|
|
|
|
#include "Parsing/Commands/Matcher/CommandsCommonMatchers.h"
|
|
#include "Parsing/Commands/Matcher/CommandsMatcherFactory.h"
|
|
|
|
namespace
|
|
{
|
|
static constexpr auto CAPTURE_GAME = 1;
|
|
}
|
|
|
|
SequenceGame::SequenceGame()
|
|
{
|
|
const CommandsMatcherFactory create(this);
|
|
|
|
AddMatchers({
|
|
create.Keyword("game"),
|
|
create.Identifier().Capture(CAPTURE_GAME),
|
|
create.Char(';'),
|
|
});
|
|
}
|
|
|
|
void SequenceGame::ProcessMatch(CommandsParserState* state, SequenceResult<CommandsParserValue>& result) const
|
|
{
|
|
state->SetGame(result.NextCapture(CAPTURE_GAME).IdentifierValue());
|
|
}
|