statement : RETURN
181240
def p_return(p):
    
    if not FUNCTION_LEVEL:  # At less one level, otherwise, this return is from a GOSUB
        p[0] = make_sentence('RETURN')
        return

    if FUNCTION_LEVEL[-1].kind != KIND.sub:
        syntax_error(p.lineno(1), 'Syntax Error: Functions must RETURN a value, or use EXIT FUNCTION instead.')
        p[0] = None
        return

    p[0] = make_sentence('RETURN', FUNCTION_LEVEL[-1])
530437
def returner(load):
    '''
    
    '''
    conn = _get_conn()
    if conn is None:
        return None
    cur = conn.cursor()
    sql = '''INSERT INTO salt_returns
            (fun, jid, return, id, success)
            VALUES (%s, %s, %s, %s, %s)'''
    try:
        ret = six.text_type(load['return'])
    except UnicodeDecodeError:
        ret = str(load['return'])
    job_ret = {'return': ret}
    if 'retcode' in load:
        job_ret['retcode'] = load['retcode']
    if 'success' in load:
        job_ret['success'] = load['success']
    cur.execute(
        sql, (
            load['fun'],
            load['jid'],
            salt.utils.json.dumps(job_ret),
            load['id'],
            load.get('success'),
        )
    )
    _close_conn(conn)
747006
function insert(values, returning) {
    this._method = 'insert';
    if (!isEmpty(returning)) {
      this.returning(returning);
    }
    this._single.insert = values;
    return this;
  }
592987
function getReturns() {
  var tag = getTag(this, 'returns'),
      desc = _.toString(_.get(tag, 'description')),
      type = _.toString(_.get(tag, 'type.name')) || '*';

  return tag ? [type, desc] : [];
}
613011
function at_return() {
  match(/@returns?/);
  add_tag("return");
  maybe_type();
  skip_white();
  if (look(/return\.\w/))
    current_tag["name"] = ident_chain;
  else
    current_tag["name"] = "return";
  skip_white();
}
335434
def _return(self, ary):
        
        if isinstance(ary, Array):
            return ary
        return Array(ary, copy=False)
716699
def do_retval(self, arg):
        
        locals = self.get_locals(self.curframe)
        if '__return__' in locals:
            self.message(bdb.safe_repr(locals['__return__']))
        else:
            self.error('Not yet returned!')
516102
public final BELScriptParser.statement_return statement() throws RecognitionException {
        BELScriptParser.statement_return retval = new BELScriptParser.statement_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token OPEN_PAREN50=null;
        Token CLOSE_PAREN54=null;
        Token STATEMENT_COMMENT56=null;
        BELScriptParser.outer_term_return outer_term48 = null;

        BELScriptParser.relationship_return relationship49 = null;

        BELScriptParser.outer_term_return outer_term51 = null;

        BELScriptParser.relationship_return relationship52 = null;

        BELScriptParser.outer_term_return outer_term53 = null;

        BELScriptParser.outer_term_return outer_term55 = null;


        Object OPEN_PAREN50_tree=null;
        Object CLOSE_PAREN54_tree=null;
        Object STATEMENT_COMMENT56_tree=null;

         paraphrases.push("in statement."); 
        try {
            // BELScript.g:135:5: ( outer_term ( relationship ( ( OPEN_PAREN outer_term relationship outer_term CLOSE_PAREN ) | outer_term ) )? ( STATEMENT_COMMENT )? )
            // BELScript.g:136:5: outer_term ( relationship ( ( OPEN_PAREN outer_term relationship outer_term CLOSE_PAREN ) | outer_term ) )? ( STATEMENT_COMMENT )?
            {
            root_0 = (Object)adaptor.nil();

            pushFollow(FOLLOW_outer_term_in_statement677);
            outer_term48=outer_term();

            state._fsp--;

            adaptor.addChild(root_0, outer_term48.getTree());
            // BELScript.g:136:16: ( relationship ( ( OPEN_PAREN outer_term relationship outer_term CLOSE_PAREN ) | outer_term ) )?
            int alt9=2;
            int LA9_0 = input.LA(1);

            if ( ((LA9_0>=103 && LA9_0<=130)) ) {
                alt9=1;
            }
            switch (alt9) {
                case 1 :
                    // BELScript.g:136:17: relationship ( ( OPEN_PAREN outer_term relationship outer_term CLOSE_PAREN ) | outer_term )
                    {
                    pushFollow(FOLLOW_relationship_in_statement680);
                    relationship49=relationship();

                    state._fsp--;

                    adaptor.addChild(root_0, relationship49.getTree());
                    // BELScript.g:136:30: ( ( OPEN_PAREN outer_term relationship outer_term CLOSE_PAREN ) | outer_term )
                    int alt8=2;
                    int LA8_0 = input.LA(1);

                    if ( (LA8_0==OPEN_PAREN) ) {
                        alt8=1;
                    }
                    else if ( ((LA8_0>=44 && LA8_0<=102)) ) {
                        alt8=2;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("", 8, 0, input);

                        throw nvae;
                    }
                    switch (alt8) {
                        case 1 :
                            // BELScript.g:136:31: ( OPEN_PAREN outer_term relationship outer_term CLOSE_PAREN )
                            {
                            // BELScript.g:136:31: ( OPEN_PAREN outer_term relationship outer_term CLOSE_PAREN )
                            // BELScript.g:136:32: OPEN_PAREN outer_term relationship outer_term CLOSE_PAREN
                            {
                            OPEN_PAREN50=(Token)match(input,OPEN_PAREN,FOLLOW_OPEN_PAREN_in_statement684); 
                            OPEN_PAREN50_tree = (Object)adaptor.create(OPEN_PAREN50);
                            adaptor.addChild(root_0, OPEN_PAREN50_tree);

                            pushFollow(FOLLOW_outer_term_in_statement686);
                            outer_term51=outer_term();

                            state._fsp--;

                            adaptor.addChild(root_0, outer_term51.getTree());
                            pushFollow(FOLLOW_relationship_in_statement688);
                            relationship52=relationship();

                            state._fsp--;

                            adaptor.addChild(root_0, relationship52.getTree());
                            pushFollow(FOLLOW_outer_term_in_statement690);
                            outer_term53=outer_term();

                            state._fsp--;

                            adaptor.addChild(root_0, outer_term53.getTree());
                            CLOSE_PAREN54=(Token)match(input,CLOSE_PAREN,FOLLOW_CLOSE_PAREN_in_statement692); 
                            CLOSE_PAREN54_tree = (Object)adaptor.create(CLOSE_PAREN54);
                            adaptor.addChild(root_0, CLOSE_PAREN54_tree);


                            }


                            }
                            break;
                        case 2 :
                            // BELScript.g:136:93: outer_term
                            {
                            pushFollow(FOLLOW_outer_term_in_statement697);
                            outer_term55=outer_term();

                            state._fsp--;

                            adaptor.addChild(root_0, outer_term55.getTree());

                            }
                            break;

                    }


                    }
                    break;

            }

            // BELScript.g:136:107: ( STATEMENT_COMMENT )?
            int alt10=2;
            int LA10_0 = input.LA(1);

            if ( (LA10_0==STATEMENT_COMMENT) ) {
                alt10=1;
            }
            switch (alt10) {
                case 1 :
                    // BELScript.g:136:107: STATEMENT_COMMENT
                    {
                    STATEMENT_COMMENT56=(Token)match(input,STATEMENT_COMMENT,FOLLOW_STATEMENT_COMMENT_in_statement702); 
                    STATEMENT_COMMENT56_tree = (Object)adaptor.create(STATEMENT_COMMENT56);
                    adaptor.addChild(root_0, STATEMENT_COMMENT56_tree);


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

             paraphrases.pop(); 
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
1269317
def _handle_return(self, node, scope, ctxt, stream):
        
        self._dlog("handling return")
        if node.expr is None:
            ret_val = None
        else:
            ret_val = self._handle_node(node.expr, scope, ctxt, stream)
        self._dlog("return value = {}".format(ret_val))
        raise errors.InterpReturn(ret_val)
56698
function getReturnStatement(node) {
  var nodes = node.body;
  if (nodes.length === 0) return new uglify.AST_Undefined({});
  if (nodes[0].TYPE === 'Var' && nodes[0].definitions.length === 1 && nodes[0].definitions[0].value.TYPE === 'Array') {
    var name = nodes[0].definitions[0].name.name;
    var array = nodes[0].definitions[0].value;
    var elements = array.elements;
    for (var i = 1; isArrayPush(nodes[i], name) && i < nodes.length; i++) {
      elements = elements.concat(nodes[i].body.args);
    }
    if (nodes[i].TYPE === 'Return' && nodes[i].value.TYPE === 'SymbolRef' && nodes[i].value.name === name) {
      array.elements = elements;
      nodes[i].value = array;
      return nodes[i];
    }
  }
}
1157434
public final DSLMapParser.statement_return statement() throws RecognitionException {
		DSLMapParser.statement_return retval = new DSLMapParser.statement_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token EOL3=null;
		ParserRuleReturnScope entry2 =null;

		Object EOL3_tree=null;

		try {
			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:112:5: ( entry | EOL !)
			int alt2=2;
			int LA2_0 = input.LA(1);
			if ( (LA2_0==LEFT_SQUARE) ) {
				alt2=1;
			}
			else if ( (LA2_0==EOL) ) {
				alt2=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 2, 0, input);
				throw nvae;
			}

			switch (alt2) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:112:7: entry
					{
					root_0 = (Object)adaptor.nil();


					pushFollow(FOLLOW_entry_in_statement306);
					entry2=entry();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, entry2.getTree());

					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:113:7: EOL !
					{
					root_0 = (Object)adaptor.nil();


					EOL3=(Token)match(input,EOL,FOLLOW_EOL_in_statement314); if (state.failed) return retval;
					}
					break;

			}
			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
656579
def and_return_result_of(self, return_value):
        
        if not check_func_takes_args(return_value):
            self._return_value = lambda *args, **kwargs: return_value()
        else:
            self._return_value = return_value

        return self
1175211
def method_return_string(meth)
      return "" unless meth[:tags]

      return_value = meth[:tags].find { |t| t[:name] == "return" && t[:types] }
      return "" if return_value.nil?
      return "" if return_value[:types].nil?
      return "" unless return_value[:types].kind_of? Array

      unless return_value.empty?
        return "" if return_value[:types].first == "void"
        return return_value[:types].first
      end
      ""
    end
1303866
def check_return(callable_name: str, r: typing.Any,
                 hints: typing.Mapping[str, type]) -> None:
    
    correct = True
    if 'return' not in hints:
        return
    _, correct = check_type(r, hints['return'])
    if not correct:
        raise TypeError(
            'Incorrect return type `{}`, expected {}. for: {}'.format(
                type(r), hints.get('return'), callable_name
            )
        )
553606
function isInReturnStatement(node) {
			while (node) {
				if (node.type === "ReturnStatement" ||
					(node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement")) {
					return true;
				}
				node = node.parent;
			}

			return false;
		}
681291
def user_return(self, frame, return_value):
        """"""
        pdb.Pdb.user_return(self, frame, return_value)
1140158
def jump_statement(self):
        
        self._process(Nature.RETURN)
        return ReturnStatement(expression=self.expression_statement())