mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-26 06:11:53 +00:00
14 lines
589 B
C++
14 lines
589 B
C++
#include "HeaderMatcherCharacter.h"
|
|
|
|
HeaderMatcherCharacter::HeaderMatcherCharacter(const char c)
|
|
: m_char(c)
|
|
{
|
|
}
|
|
|
|
MatcherResult<HeaderParserValue> HeaderMatcherCharacter::CanMatch(ILexer<HeaderParserValue>* lexer, const unsigned tokenOffset)
|
|
{
|
|
const auto& token = lexer->GetToken(tokenOffset);
|
|
return token.m_type == HeaderParserValueType::CHARACTER && token.CharacterValue() == m_char ? MatcherResult<HeaderParserValue>::Match(1)
|
|
: MatcherResult<HeaderParserValue>::NoMatch();
|
|
}
|