WIP: This parser just type checks, it hasn't even been tested manually. Check new tasks in the TODO file and the TODO comments in the code for more gotchas.