Refactor vim integration test
Parsing of function bodies

This change makes the parsing of function bodies much more resilient.
If it encounters internal errors parsing out the contents of a function
it will still continue to parse the rest of the function body.  It will
then fail the function body as a whole and not restart parsing on the
next line.

closes #1086