Currently, every time we need a token, we just ask the lexer to get the next token, we work with it and the cycle repeats. Instead what we need is for the lexer to run ONCE before the compiler and generate a list of tokens. We can then work on these tokens.
This will allow us to ignore unused procedures, add preprocessing and add better debugging information.
Currently, every time we need a token, we just ask the lexer to get the next token, we work with it and the cycle repeats. Instead what we need is for the lexer to run ONCE before the compiler and generate a list of tokens. We can then work on these tokens.
This will allow us to ignore unused procedures, add preprocessing and add better debugging information.