28 function_table functions;
29 function_stack super_stack;
30 static function_table global_functions;
31 static method_table global_methods;
32 static filter_table global_filters;
34 [[nodiscard]] function_type get_function(
std::string const &name)
const noexcept
36 if (name ==
"super") {
37 if (super_stack.size() > 0) {
38 return super_stack.back();
44 hilet i = functions.find(name);
45 if (i != functions.end()) {
49 hilet j = global_functions.find(name);
50 if (j != global_functions.end()) {
57 [[nodiscard]] function_type set_function(
std::string const &name, function_type func)
noexcept
61 swap(functions[name], func);
65 void push_super(function_type func)
noexcept
67 super_stack.push_back(func);
70 void pop_super(
void)
noexcept
72 super_stack.pop_back();
75 [[nodiscard]] filter_type get_filter(
std::string const &name)
const noexcept
77 hilet i = global_filters.find(name);
78 if (i != global_filters.end()) {
85 [[nodiscard]] method_type get_method(
std::string const &name)
const noexcept
87 hilet i = global_methods.find(name);
88 if (i != global_methods.end()) {