void invalid_type::throw_(const char* file, std::size_t line, std::string const& descr) { boost::throw_exception(boost::enable_error_info(invalid_type(descr)) << boost::throw_file(file) << boost::throw_line(line) ); }
void invalid_type::throw_(const char* file, std::size_t line, std::string const& descr, attribute_name const& name, typeindex::type_index const& type) { boost::throw_exception(boost::enable_error_info(invalid_type(descr)) << boost::throw_file(file) << boost::throw_line(line) << attribute_name_info(name) << type_info_info(type) ); }
int new_mj_new_object(ast *class_id, ast **node) { mj_new_object *no; if(!is_of_type(MJ_IDENTIFIER, class_id)) { return invalid_type(node); } no = jrv_malloc(sizeof(mj_new_object)); no->type = MJ_NEW_OBJECT; no->class_id = (mj_identifier *) class_id; *node = (ast *) no; return JRV_SUCCESS; }