Fix diagnostic emission in the lexer.
Add preliminary location to nodes.
Externalize lexer error messages.