mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-13 16:28:31 -05:00
Move Menu Expression to Simple Namespace to have generic configurable expressions
This commit is contained in:
@ -7,6 +7,8 @@
|
||||
#include "MatcherAnd.h"
|
||||
#include "MatcherLabel.h"
|
||||
#include "MatcherLoop.h"
|
||||
#include "MatcherFalse.h"
|
||||
#include "MatcherTrue.h"
|
||||
#include "MatcherOptional.h"
|
||||
#include "MatcherOr.h"
|
||||
#include "Parsing/IParserValue.h"
|
||||
@ -85,6 +87,16 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
_NODISCARD MatcherFactoryWrapper<TokenType> False() const
|
||||
{
|
||||
return MatcherFactoryWrapper<TokenType>(std::make_unique<MatcherFalse<TokenType>>());
|
||||
}
|
||||
|
||||
_NODISCARD MatcherFactoryWrapper<TokenType> True() const
|
||||
{
|
||||
return MatcherFactoryWrapper<TokenType>(std::make_unique<MatcherTrue<TokenType>>());
|
||||
}
|
||||
|
||||
_NODISCARD MatcherFactoryWrapper<TokenType> And(std::initializer_list<Movable<std::unique_ptr<AbstractMatcher<TokenType>>>> matchers) const
|
||||
{
|
||||
return MatcherFactoryWrapper<TokenType>(std::make_unique<MatcherAnd<TokenType>>(matchers));
|
||||
|
Reference in New Issue
Block a user