Add menu unary expression for minus

This commit is contained in:
Jan
2021-11-14 20:04:36 +01:00
parent ebb8eb9e5b
commit 9a2e74d083
3 changed files with 20 additions and 0 deletions

View File

@ -276,6 +276,10 @@ std::unique_ptr<MenuCommonMatchers::matcher_t> MenuCommonMatchers::ParseUnaryOpe
{
return SimpleParserValue::Integer(values[0].get().GetPos(), static_cast<int>(UnaryOperationId::BITWISE_NOT));
}),
create.Char('-').Transform([](const MenuMatcherFactory::token_list_t& values)
{
return SimpleParserValue::Integer(values[0].get().GetPos(), static_cast<int>(UnaryOperationId::NEGATIVE));
}),
}).Tag(TAG_EXPRESSION_UNARY_OPERATION).Capture(CAPTURE_UNARY_OPERATION_TYPE);
}