Refactor function definition parsing code.
Add parsing support for if-else statements.