refactor so lexer+parser keeps track of errors

The lexer and parser have their own error reporting mechanism, so this can be used to keep track of any errors encountered while lexing/parsing instead of using `global.errors`. All in having a better plan for errors than a global variable.

Also eliminated inexplicable use of `::error()` in parse.c.