Add support for multi-line functions (#13648).

Functions can now consist of several lines and contain control
structures.

Change-Id: I3cf3a0e04327d2b441405cb3ed28d46a24b1eb32