mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
Fix unit tests failing for menu expressions
This commit is contained in:
parent
38f3d7d10e
commit
c5475ce780
@ -38,6 +38,9 @@ std::unique_ptr<SimpleExpressionMatchers::matcher_t> MenuExpressionMatchers::Par
|
||||
|
||||
std::unique_ptr<ISimpleExpression> MenuExpressionMatchers::ProcessOperandExtension(SequenceResult<SimpleParserValue>& result) const
|
||||
{
|
||||
if (result.PeekAndRemoveIfTag(TAG_EXPRESSION_FUNCTION_CALL) != TAG_EXPRESSION_FUNCTION_CALL)
|
||||
throw ParsingException(TokenPos(), "Menu Operand Extension must be function call");
|
||||
|
||||
auto functionCall = std::make_unique<CommonExpressionFunctionCall>(result.NextCapture(CAPTURE_FUNCTION_NAME).IdentifierValue());
|
||||
|
||||
while (result.PeekAndRemoveIfTag(TAG_EXPRESSION_FUNCTION_CALL_END) != TAG_EXPRESSION_FUNCTION_CALL_END)
|
||||
|
@ -63,7 +63,7 @@ std::vector<const SimpleExpressionUnaryOperationType*> SimpleExpressionMatchers:
|
||||
std::vector<const SimpleExpressionBinaryOperationType*> SimpleExpressionMatchers::EnabledBinaryOperations() const
|
||||
{
|
||||
return std::vector(&SimpleExpressionBinaryOperationType::ALL_OPERATION_TYPES[0],
|
||||
&SimpleExpressionBinaryOperationType::ALL_OPERATION_TYPES[std::extent_v<decltype(SimpleExpressionUnaryOperationType::ALL_OPERATION_TYPES)>]);
|
||||
&SimpleExpressionBinaryOperationType::ALL_OPERATION_TYPES[std::extent_v<decltype(SimpleExpressionBinaryOperationType::ALL_OPERATION_TYPES)>]);
|
||||
}
|
||||
|
||||
std::unique_ptr<ISimpleExpression> SimpleExpressionMatchers::ProcessExpressionInParenthesis(SequenceResult<SimpleParserValue>& result) const
|
||||
@ -171,7 +171,7 @@ std::unique_ptr<ISimpleExpression> SimpleExpressionMatchers::ProcessExpression(S
|
||||
if (p1.second->m_precedence != p2.second->m_precedence)
|
||||
return p1.second->m_precedence > p2.second->m_precedence;
|
||||
|
||||
return p1.first > p2.first;
|
||||
return p1.first < p2.first;
|
||||
});
|
||||
|
||||
while (!operators.empty())
|
||||
|
Loading…
x
Reference in New Issue
Block a user