Skip to content
Discussion options

You must be logged in to vote

Hey @sho94os,

Specifically, can the parser continue building a partial AST after encountering a syntax error or unexpected token, so the language server can still provide semantic features in the rest of the file?

yes it does! We've specifically chosen Chevrotain for its error recovery feature (in addition to its stellar performance). See also here for more info. In our experience, the error recovery of Chevrotain performs fairly well without any real hiccups to the user experience. The error is reported, and the rest of the program is parsed as expected, which then allows Langium to provide LSP features even after the location of the syntax error.

Note that, in some edge cases, for spe…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sho94os
Comment options

Answer selected by msujew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants