function make_lambda( std::vector<std::string> const& args, bool fixed_arity, utree const& body) const { environment local_env(&this->env); for (std::size_t i = 0; i < args.size(); ++i) { if (!fixed_arity && (args.size() - 1) == i) local_env.define(args[i], boost::bind(varg, i, local_env.level()), 0, false); else local_env.define(args[i], boost::bind(arg, i, local_env.level()), 0, false); } actor_list flist; if (body.size() == 0) return function(); //~ throw no_body(); BOOST_FOREACH(utree const& item, body) { function f = compile(item, local_env, fragments, line, source_file); if (!is_define(item)) flist.push_back(f); }
bool addition_init::is_define(const string& name) { char ch; if(index_c(name,ch)) { return is_define(ch); } return false; }
static const char *start_if_define_extended(cmd_parms * cmd, void *dummy, const char *arg) { const char *endp; char *expr; int define; int not = 0; endp = ap_strrchr_c(arg, '>'); if (endp == NULL) { return (const char *) apr_pstrcat(cmd->pool, cmd->cmd->name, "> directive missing closing '>'", NULL); } expr = apr_pstrndup(cmd->temp_pool, arg, endp - arg); if (expr[0] == '!') { not = 1; expr++; } define = is_define(cmd, expr); if ((!not && define) || (not && !define)) { ap_directive_t *parent = NULL; ap_directive_t *current = NULL; const char *retval; retval = ap_build_cont_config(cmd->pool, cmd->temp_pool, cmd, ¤t, &parent, "<IfDefineExtended"); *(ap_directive_t **) dummy = current; return retval; } else { *(ap_directive_t **) dummy = NULL; return ap_soak_end_container(cmd, "<IfDefineExtended"); } }