Skip to content

Commit 2ae48be

Browse files
committed
Refactoring the input action script grammar.
* Added formatters for ice::isize types.
1 parent c3a2ba6 commit 2ae48be

16 files changed

+714
-597
lines changed

source/code/core/utils/public/ice/log_formatters.hxx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,22 @@ struct fmt::formatter<ice::usize>
160160
}
161161
};
162162

163+
template<>
164+
struct fmt::formatter<ice::isize> : fmt::formatter<ice::usize>
165+
{
166+
template<typename FormatContext>
167+
constexpr auto format(ice::isize value, FormatContext& ctx) const noexcept
168+
{
169+
auto output = ctx.out();
170+
if (value.value < 0)
171+
{
172+
output = fmt::format_to(ctx.out(), "-");
173+
value = -value;
174+
}
175+
return fmt::formatter<ice::usize>::format(value.to_usize(), ctx);
176+
}
177+
};
178+
163179
template<>
164180
struct fmt::formatter<ice::ErrorCode>
165181
{

source/code/systems/input_action_system/private/input_action_dsl.cxx

Lines changed: 0 additions & 165 deletions
This file was deleted.

0 commit comments

Comments
 (0)