Implement the parser's expect() function

Also start implementing parser tests.
We can leave out the `new`.