// We'd be really fancy if we filtered out return statements in // inner blocks. static bool containsReturnWithArgument(L tok) { for (int i = 1; i+2 < l(tok); i += 2) { S t = tok.get(i); if (eqOneOf(t, "ret", "return") && neqOneOf(tok.get(i+2), ";", "if", "unless", "with")) true; // skip embedded functions if (eq(t, "embedded") && isIdentifier(get(tok, i+2))) i = tok_findEndOfMethodDecl(tok, i)-1; } false; } static bool containsReturnWithArgument(S code) { ret containsReturnWithArgument(javaTok(code)); }