Preprocessor improvements.

* Added some better errors.
* Moved some functions from context to the preprocessor, makes calling them a bit easier.
Added context errors for unexpected tokens in preprocessor.