The parser is set up to be robust to syntax errors, but recovery can result in nodes that do not follow the expected types. The visitor/processor accounts for some recovery situations, but not all, and throws uncaught errors upon new recovery scenarios. This fully crashes the parser (and, subsequently, the VSCode extension).
To make things more robust, file-level processing should catch thrown errors and still emit diagnostics.
The parser is set up to be robust to syntax errors, but recovery can result in nodes that do not follow the expected types. The visitor/processor accounts for some recovery situations, but not all, and throws uncaught errors upon new recovery scenarios. This fully crashes the parser (and, subsequently, the VSCode extension).
To make things more robust, file-level processing should catch thrown errors and still emit diagnostics.