14 statement_vector children;
24 auto name_and_arguments = function_declaration_expression->get_name_and_argument_names();
25 hi_assert(name_and_arguments.size() >= 1);
27 name = name_and_arguments[0];
28 name_and_arguments.erase(name_and_arguments.begin());
29 argument_names =
std::move(name_and_arguments);
31 super_function = context.set_function(
34 return this->evaluate_call(context, arguments);
37 throw operation_error(std::format(
"{}: Failed during handling of function call.\n{}", location, e.
what()));
52 if (ssize(children) > 0) {
53 children.back()->left_align();
56 context.push_super(super_function);
57 for (
hilet &child : children) {
58 child->post_process(context);
71 if (ssize(argument_names) != ssize(arguments)) {
73 "{}: Invalid number of arguments to function {}() expecting {} got {}.",
76 argument_names.
size(),
80 for (ssize_t i = 0; i != ssize(argument_names); ++i) {
81 context.set(argument_names[i], arguments[i]);
85 auto tmp = evaluate_children(context, children);
89 throw operation_error(std::format(
"{}: Found #break not inside a loop statement.", location));
91 }
else if (tmp.is_continue()) {
92 throw operation_error(std::format(
"{}: Found #continue not inside a loop statement.", location));
94 }
else if (tmp.is_undefined()) {
109 s += join(argument_names,
",");
bool append(std::unique_ptr< skeleton_node > x) noexcept override
Append a template-piece to the current template.
Definition skeleton_function_node.hpp:44