Source Pruning for Language Sever Completion #14216
Labels
Team/CompilerFETools
Semantic API, Formatter, Shell
Team/LanguageServer
Language Server Implementation related issues. #Compiler
Type/Improvement
Type/Task
Description:
Auto-completion is provided most of the time, while the user is typing. During the typing, ballerina source is incorrect with syntax errors. Therefore, when trying to parse the source (in the sense, current package) compiler fails to build the correct source. In order to avoid the compiler failures, either grammar or parser has to optimize for fallback and recover the error. This approach can be error-prone and performance intensive due to the inline context recovery.
In order to avoid complexity, another approach is to prune the source/ remove the erroneous tokens and inject a valid source to the parser.
Affected Versions:
v0.990.3.0
The text was updated successfully, but these errors were encountered: