What they shouldn’t do is produce a binary based on their (smart or stupid) guesses about the programmer’s intention.
That allows you to compile, fix multiple typos, compile, instead of compile, fix one typo, compile, fix the next typo, compile, etc, _and_ prevents you from running a program that you didn’t write.
I am not aware of any compiler that doesn’t do this, as it would be extremely annoying to have a compiler give up at the first error.
The search term to use is parser error recovery. It doesn’t give obviously great hits, though. Sample hits:
- https://www.geeksforgeeks.org/what-is-error-recovery/
- https://cs.adelaide.edu.au/~charles/lt/Lectures/07-ErrorReco...
- https://en.wikipedia.org/wiki/Burke–Fisher_error_repair
- https://en.wikipedia.org/wiki/LR_parser#Syntax_error_recover...