#include "ZoneDefinitionMatcherKeyword.h" ZoneDefinitionMatcherKeyword::ZoneDefinitionMatcherKeyword(std::string value) : m_value(std::move(value)) { const std::hash hash; m_hash = hash(m_value); } MatcherResult ZoneDefinitionMatcherKeyword::CanMatch(ILexer* lexer, const unsigned tokenOffset) { const auto& token = lexer->GetToken(tokenOffset); return token.m_type == ZoneDefinitionParserValueType::FIELD && token.FieldHash() == m_hash && token.FieldValue() == m_value ? MatcherResult::Match(1) : MatcherResult::NoMatch(); }