Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Pruning for Language Sever Completion #14216

Closed
2 of 4 tasks
nadeeshaan opened this issue Mar 8, 2019 · 0 comments · Fixed by #15128
Closed
2 of 4 tasks

Source Pruning for Language Sever Completion #14216

nadeeshaan opened this issue Mar 8, 2019 · 0 comments · Fixed by #15128
Assignees
Labels
Team/CompilerFETools Semantic API, Formatter, Shell Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Improvement Type/Task

Comments

@nadeeshaan
Copy link
Contributor

nadeeshaan commented Mar 8, 2019

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.

  • Finalize the terminating tokens
  • Finalize the token removal rules for grammar
  • Implement Token Removal strategy
  • Implement Source inject through document manager and Completion context

Affected Versions:
v0.990.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/CompilerFETools Semantic API, Formatter, Shell Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Improvement Type/Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants