fix(parse): handle promises returned from parsed function calls

When a parsed function call returns a promise, it is now returns the
resolved value of the promise rather than the promise object.

Closes #3503