7#include "skeleton_node.hpp"
8#include "../macros.hpp"
25 auto new_text_length = ssize(text);
26 for (
auto i = text.crbegin(); i != text.crend(); ++i, --new_text_length) {
27 if (*i ==
' ' || *i ==
'\t') {
30 }
else if (*i ==
'\n') {
38 text.resize(new_text_length);
43 return std::format(
"<text {}>", text);
46 datum
evaluate(formula_evaluation_context &context)
override
DOXYGEN BUG.
Definition algorithm.hpp:16
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
Definition parse_location.hpp:18
Definition skeleton_node.hpp:16
Definition skeleton_string_node.hpp:12
void left_align() noexcept override
Remove any trailing spaces or tabs after a new-line.
Definition skeleton_string_node.hpp:22
datum evaluate(formula_evaluation_context &context) override
Evaluate the template.
Definition skeleton_string_node.hpp:46
bool should_left_align() const noexcept override
Should any spaces on the left side of a statement be removed?
Definition skeleton_string_node.hpp:17