Attempt at better errors (line numbers + context) and tests

There is going to be a slight memory performance hit while parsing (since I keep references back to the original source in the individual tokens), but shouldn't affect the size of the final result.

Excuse my unclever test cases. There are probably more errors that could be tested for, but I thought this was a good start.