7#include "formula_node.hpp"
20 tt_assert(pair_ !=
nullptr);
21 tt_assert(pair_->args.
size() == 2);
29 lhs->post_process(context);
30 rhs_true->post_process(context);
31 rhs_false->post_process(context);
35 ttlet lhs_ = lhs->evaluate(context);
37 return rhs_true->evaluate(context);
39 return rhs_false->evaluate(context);
44 return std::format(
"({} ? {} : {})", *lhs, *rhs_true, *rhs_false);
A dynamic data type.
Definition datum.hpp:213
A temporary node used during parsing.
Definition formula_arguments.hpp:13
Definition formula_evaluation_context.hpp:16
Definition formula_node.hpp:19
Definition formula_post_process_context.hpp:19
Definition formula_ternary_operator_node.hpp:11
datum evaluate(formula_evaluation_context &context) const override
Evaluate an rvalue.
Definition formula_ternary_operator_node.hpp:34
void post_process(formula_post_process_context &context) override
Resolve function and method pointers.
Definition formula_ternary_operator_node.hpp:28
Definition parse_location.hpp:17