4 ms·
In fact, that often even bleeds forward into the front end. For a compiler, you're in this state of actively discarding information. Comments? Don't even lex th
by Locke1689 11y ago
In fact, that often even bleeds forward into the front end. For a compiler, you're in this state of actively discarding information. Comments? Don't even lex them. Variable names? Just de Bruijn index them.
FYI, for anyone thinking about writing a production compiler front-end, don't do this, it's a terrible idea.
- krallja 11y agoBecause your error messages might be less-than-useful. Not that Wasabi ever had an issue with that. Cough.
- munificent 11y agoI think the important bit is to not throw that information away until after you've reported any compile errors. Once you know the code is valid, you can discard that stuff (unless you need it to generate debugging information).
- Locke1689 11y agoOh, yes, that's fine. Although by that point you've kind of already spent the time, so it's not going to gain you much by throwing it out.