mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-09-10 16:07:06 +00:00
Make menu and item rect accept expressions as static values
This commit is contained in:
@@ -1,19 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include "Parsing/Sequence/SequenceResult.h"
|
||||
#include "Parsing/Simple/Matcher/SimpleMatcherFactory.h"
|
||||
|
||||
namespace menu
|
||||
{
|
||||
class MenuMatcherFactory : public SimpleMatcherFactory
|
||||
{
|
||||
static constexpr auto TAG_INT = 1420;
|
||||
static constexpr auto TAG_NUMERIC = 1421;
|
||||
static constexpr auto TAG_EXPRESSION = 1422;
|
||||
|
||||
static constexpr auto CAPTURE_FIRST_TOKEN = 1420;
|
||||
static constexpr auto CAPTURE_INT = 1421;
|
||||
static constexpr auto CAPTURE_NUMERIC = 1422;
|
||||
|
||||
public:
|
||||
explicit MenuMatcherFactory(const IMatcherForLabelSupplier<SimpleParserValue>* labelSupplier);
|
||||
|
||||
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> Text() const;
|
||||
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> Numeric() const;
|
||||
|
||||
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> IntExpression() const;
|
||||
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> NumericExpression() const;
|
||||
|
||||
_NODISCARD static int TokenNumericIntValue(const SimpleParserValue& value);
|
||||
_NODISCARD static double TokenNumericFloatingPointValue(const SimpleParserValue& value);
|
||||
_NODISCARD static std::string& TokenTextValue(const SimpleParserValue& value);
|
||||
|
||||
_NODISCARD static int TokenIntExpressionValue(SequenceResult<SimpleParserValue>& result);
|
||||
_NODISCARD static double TokenNumericExpressionValue(SequenceResult<SimpleParserValue>& result);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user