3 ms·
You wouldn't be running anything that has been repaired, the fact that a repair is done means that a syntax error has occurred and compilation has failed. The r
by thehobgoblin 6y ago
You wouldn't be running anything that has been repaired, the fact that a repair is done means that a syntax error has occurred and compilation has failed. The repair is just a recovery strategy so that the compiler can work further in order to potentially uncover further errors.
This is what compilers do already, one such strategy is to unwind the state to before the error and skip over the erroneous part. This can be a bit problematic in certain situations, such as a syntax error in a variable definition and the following flood of 'undefined variable' errors.
The repair strategy in the article is trying to optimise the quality of the attempted repair in order to provide better error messages to the user.