diff options
-rw-r--r-- | src/report.cc | 14 | ||||
-rw-r--r-- | src/report.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/report.cc b/src/report.cc index d3a219a0..548d39df 100644 --- a/src/report.cc +++ b/src/report.cc @@ -622,6 +622,16 @@ value_t report_t::fn_floor(call_scope_t& args) return args[0].floored(); } +value_t report_t::fn_round(call_scope_t& args) +{ + return args[0].rounded(); +} + +value_t report_t::fn_unround(call_scope_t& args) +{ + return args[0].unrounded(); +} + value_t report_t::fn_abs(call_scope_t& args) { return args[0].abs(); @@ -1281,6 +1291,8 @@ expr_t::ptr_op_t report_t::lookup(const symbol_t::kind_t kind, return MAKE_FUNCTOR(report_t::fn_rounded); else if (is_eq(p, "red")) return WRAP_FUNCTOR(fn_red); + else if (is_eq(p, "round")) + return MAKE_FUNCTOR(report_t::fn_round); break; case 's': @@ -1333,6 +1345,8 @@ expr_t::ptr_op_t report_t::lookup(const symbol_t::kind_t kind, case 'u': if (is_eq(p, "underline")) return WRAP_FUNCTOR(fn_underline); + else if (is_eq(p, "unround")) + return MAKE_FUNCTOR(report_t::fn_unround); else if (is_eq(p, "unrounded")) return MAKE_FUNCTOR(report_t::fn_unrounded); break; diff --git a/src/report.h b/src/report.h index e142b0dc..58c12f24 100644 --- a/src/report.h +++ b/src/report.h @@ -160,6 +160,8 @@ public: value_t fn_unrounded(call_scope_t& scope); value_t fn_truncated(call_scope_t& scope); value_t fn_floor(call_scope_t& scope); + value_t fn_round(call_scope_t& scope); + value_t fn_unround(call_scope_t& scope); value_t fn_abs(call_scope_t& scope); value_t fn_justify(call_scope_t& scope); value_t fn_quoted(call_scope_t& scope); |