7#include "formula_node.hpp"
9namespace hi::inline
v1 {
21 for (
auto &value : values) {
22 value->post_process(context);
29 for (
hilet &value : values) {
37 if (!holds_alternative<datum::vector_type>(rhs)) {
38 throw operation_error(std::format(
"{}: Unpacking values can only be done on vectors, got {}.", location, rhs));
40 if (values.size() < 1) {
41 throw operation_error(std::format(
"{}: Unpacking can only be done on 1 or more return values.", location));
43 if (values.size() != rhs.size()) {
44 throw operation_error(std::format(
45 "{}: Unpacking values can only be done on with a vector of size {} got {}.",
56 hilet &lhs_ = values[i];
57 hilet &rhs_ = rhs_copy[i];
59 if (++i < rhs.size()) {
60 lhs_->assign(context, rhs_);
62 return lhs_->assign(context, rhs_);
71 for (
hilet &value : values) {
#define hilet
Invariant should be the default for variables.
Definition utility.hpp:23
DOXYGEN BUG.
Definition algorithm.hpp:15
A dynamic data type.
Definition datum.hpp:224
Definition formula_evaluation_context.hpp:16
Definition formula_node.hpp:29
Definition formula_post_process_context.hpp:19
Definition formula_vector_literal_node.hpp:11
datum & assign(formula_evaluation_context &context, datum const &rhs) const override
Assign to a non-existing or existing lvalue.
Definition formula_vector_literal_node.hpp:35
void post_process(formula_post_process_context &context) override
Resolve function and method pointers.
Definition formula_vector_literal_node.hpp:19
datum evaluate(formula_evaluation_context &context) const override
Evaluate an rvalue.
Definition formula_vector_literal_node.hpp:26
Definition parse_location.hpp:18