mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 06:49:28 -05:00
Adjust further code formatting
This commit is contained in:
@ -404,7 +404,8 @@ const SimpleExpressionBinaryOperationType* const SimpleExpressionBinaryOperation
|
||||
&OPERATION_EQUALS,
|
||||
&OPERATION_NOT_EQUAL,
|
||||
&OPERATION_AND,
|
||||
&OPERATION_OR};
|
||||
&OPERATION_OR,
|
||||
};
|
||||
|
||||
SimpleExpressionBinaryOperation::SimpleExpressionBinaryOperation(const SimpleExpressionBinaryOperationType* operationType,
|
||||
std::unique_ptr<ISimpleExpression> operand1,
|
||||
|
@ -298,7 +298,11 @@ std::unique_ptr<SimpleExpressionMatchers::matcher_t> SimpleExpressionMatchers::P
|
||||
|
||||
if (hasAddOperation && hasSubtractOperation)
|
||||
{
|
||||
binaryOperationsMatchers.emplace_back(create.Or({create.IntegerWithSign(), create.FloatingPointWithSign()})
|
||||
binaryOperationsMatchers.emplace_back(create
|
||||
.Or({
|
||||
create.IntegerWithSign(),
|
||||
create.FloatingPointWithSign(),
|
||||
})
|
||||
.NoConsume()
|
||||
.Transform(
|
||||
[](const SimpleMatcherFactory::token_list_t& values)
|
||||
@ -360,11 +364,13 @@ std::unique_ptr<SimpleExpressionMatchers::matcher_t> SimpleExpressionMatchers::P
|
||||
if (!m_enable_conditional_operator)
|
||||
return create.False();
|
||||
|
||||
return create.And({create.Char('?').Tag(TAG_CONDITIONAL_OPERATOR),
|
||||
create.Label(LABEL_EXPRESSION),
|
||||
create.Char(':').Tag(TAG_CONDITIONAL_OPERATOR_SEPARATOR),
|
||||
create.Label(LABEL_EXPRESSION),
|
||||
create.True().Tag(TAG_CONDITIONAL_OPERATOR_END)});
|
||||
return create.And({
|
||||
create.Char('?').Tag(TAG_CONDITIONAL_OPERATOR),
|
||||
create.Label(LABEL_EXPRESSION),
|
||||
create.Char(':').Tag(TAG_CONDITIONAL_OPERATOR_SEPARATOR),
|
||||
create.Label(LABEL_EXPRESSION),
|
||||
create.True().Tag(TAG_CONDITIONAL_OPERATOR_END),
|
||||
});
|
||||
}
|
||||
|
||||
std::unique_ptr<SimpleExpressionMatchers::matcher_t> SimpleExpressionMatchers::Expression(const supplier_t* labelSupplier) const
|
||||
@ -372,11 +378,32 @@ std::unique_ptr<SimpleExpressionMatchers::matcher_t> SimpleExpressionMatchers::E
|
||||
const SimpleMatcherFactory create(labelSupplier);
|
||||
|
||||
return create
|
||||
.And({create.OptionalLoop(ParseUnaryOperationType(labelSupplier)),
|
||||
create.Or({create.And({create.Char('('), create.Label(LABEL_EXPRESSION), create.Char(')').Tag(TAG_PARENTHESIS_END)}).Tag(TAG_PARENTHESIS),
|
||||
create.And({create.True().Tag(TAG_OPERAND_EXT), ParseOperandExtension(labelSupplier), create.True().Tag(TAG_OPERAND_EXT_END)}),
|
||||
ParseOperand(labelSupplier)}),
|
||||
create.Optional(create.Or({ParseConditionalOperator(labelSupplier),
|
||||
create.And({ParseBinaryOperationType(labelSupplier), create.Label(LABEL_EXPRESSION)}).Tag(TAG_BINARY_OPERATION)}))})
|
||||
.And({
|
||||
create.OptionalLoop(ParseUnaryOperationType(labelSupplier)),
|
||||
create.Or({
|
||||
create
|
||||
.And({
|
||||
create.Char('('),
|
||||
create.Label(LABEL_EXPRESSION),
|
||||
create.Char(')').Tag(TAG_PARENTHESIS_END),
|
||||
})
|
||||
.Tag(TAG_PARENTHESIS),
|
||||
create.And({
|
||||
create.True().Tag(TAG_OPERAND_EXT),
|
||||
ParseOperandExtension(labelSupplier),
|
||||
create.True().Tag(TAG_OPERAND_EXT_END),
|
||||
}),
|
||||
ParseOperand(labelSupplier),
|
||||
}),
|
||||
create.Optional(create.Or({
|
||||
ParseConditionalOperator(labelSupplier),
|
||||
create
|
||||
.And({
|
||||
ParseBinaryOperationType(labelSupplier),
|
||||
create.Label(LABEL_EXPRESSION),
|
||||
})
|
||||
.Tag(TAG_BINARY_OPERATION),
|
||||
})),
|
||||
})
|
||||
.Tag(TAG_EXPRESSION);
|
||||
}
|
||||
|
@ -47,7 +47,9 @@ public:
|
||||
protected:
|
||||
const std::vector<sequence_t*>& GetTestsForState() override
|
||||
{
|
||||
static std::vector<sequence_t*> sequences{new SimpleExpressionInterpreterExpressionSequence()};
|
||||
static std::vector<sequence_t*> sequences{
|
||||
new SimpleExpressionInterpreterExpressionSequence(),
|
||||
};
|
||||
return sequences;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user