parser: make some errors point to end of previous token

For some errors if the found token is not on the same line as
the previous token, point to the end of the previous token.
This usually results in more helpful errors.
9c36cf92f0Veikka Tuominen committed on 2/17/2022, 12:23:35 PMparent5283a52
8 files changedLine totals unavailable