Correct the error message generated for "all functions exhausted" to
focus on the token of the function-call site, rather than whatever
inner statement was last executed before a "next".
if (e->referents.back()->has_next)
// check for aborted return from function; this could happen from non-overloaded ones too
- o->newline() << "if (unlikely(c->next)) { c->last_error = \"all functions exhausted\"; goto out; }";
+ o->newline()
+ << "if (unlikely(c->next)) { "
+ << "c->last_stmt = " << lex_cast_qstring(*e->tok) << "; "
+ << "c->last_error = \"all functions exhausted\"; goto out; }";
// return result from retvalue slot NB: this must be last, for the
// enclosing statement-expression ({ ... }) to carry this value.