@marchaefner, awesome! That works really good in the (albeit few) cases i tested!

The "end of input" thing is definitely needed. About the OUTDENT location correction, i feel like it should be added to the lexer (that is, for the OUTDENT tokens to have a better location), but at the same time, if it's going to add more work to the lexer _for every OUTDENT token_ maybe it makes more sense to just patch it there in the error handler.

I'd like to have another opinion in this one. @jashkenas (or anyone who's reading this =P), maybe you could provide some insight here? What would be the expected error location for "unexpected OUTDENT" errors? And should that location be set on the lexer or is it OK to patch it in the error reporting?