Currently, our parser directly operates on a stream of characters, i.e. tokenizing is built into the parsing. The idea would be to make our own token type, write a lexer that transforms a character stream into a token stream, then modify the parser to parse the token stream. This should give us better error messages (and a speedup?). Jasper van der Jeugt suggests this in https://skillsmatter.com/skillscasts/9879-an-informal-guide-to-better-compiler-errors-jasper-van-der-jeugt .
Currently, our parser directly operates on a stream of characters, i.e. tokenizing is built into the parsing. The idea would be to make our own token type, write a lexer that transforms a character stream into a token stream, then modify the parser to parse the token stream. This should give us better error messages (and a speedup?). Jasper van der Jeugt suggests this in https://skillsmatter.com/skillscasts/9879-an-informal-guide-to-better-compiler-errors-jasper-van-der-jeugt .