Closed jadetang closed 3 months ago
Hi @jadetang Me personally, I have never tried to build a parser with pigeon, that works on partial AST. That being said, two ideas come to mind:
<the_thing> / <maybe_the_thing>
, where <maybe_the_thing>
is defined such, that it matches something, that could become <the_thing>
, but is not yet complete (basically matching the prefix).But since I have never done such a thing, I might not be of a lot of help.
@breml thanks, I think the second approach sounds promising. I will try that.
Hello, we are using this tool, it works well for our project. Now I want to implement the autocomplete in the LSP where most of the time the input is incomplete. Is it possible to get a partial AST? I read the error label and recovery document and examples, but I am not sure that can work for me, because I don't need to continue parsing in case something goes wrong. Any suggestion is appreciated.