14 statement_vector children;
21 auto name_and_arguments = function_declaration_expression->get_name_and_argument_names();
22 tt_assert(name_and_arguments.size() >= 1);
24 name = name_and_arguments[0];
25 name_and_arguments.erase(name_and_arguments.begin());
26 argument_names =
std::move(name_and_arguments);
28 super_function = context.set_function(name,
31 return this->evaluate_call(context, arguments);
34 throw operation_error(
"{}: Failed during handling of function call.\n{}", location, e.
what());
48 if (std::ssize(children) > 0) {
49 children.back()->left_align();
52 context.push_super(super_function);
53 for (ttlet &child: children) {
54 child->post_process(context);
65 if (std::ssize(argument_names) != std::ssize(arguments)) {
66 throw operation_error(
"{}: Invalid number of arguments to function {}() expecting {} got {}.", location, name, argument_names.
size(), arguments.
size());
69 for (ssize_t i = 0; i != std::ssize(argument_names); ++i) {
70 context.set(argument_names[i], arguments[i]);
74 auto tmp = evaluate_children(context, children);
78 throw operation_error(
"{}: Found #break not inside a loop statement.", location);
80 }
else if (tmp.is_continue()) {
81 throw operation_error(
"{}: Found #continue not inside a loop statement.", location);
83 }
else if (tmp.is_undefined()) {
97 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:42