- if(function->return_type.is_void()) {
- if(function->docu_comment.find("@SUSPEND@") != std::string::npos) {
- out << ind << "return sq_suspendvm(v);\n";
- } else {
- out << ind << "return 0;\n";
+ if(function->suspend) {
+ if(!function->return_type.is_void()) {
+ std::stringstream msg;
+ msg << "Function '" << function->name << "' declared as suspend"
+ << " but has a return value.";
+ throw std::runtime_error(msg.str());