Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

https://pypi.org/project/parso/ is what I settled on when digging into this.

It's been something like 8 months, but iirc tree-sitter would not emit anything I was able to discern as recoverable. I recognize they do implement a pretty robust error recovery, but the returned error wasn't clearly differentiable from a strict failure in a way I could program against where as for the same partially incomplete code parso would return something different than if it was unrecoverable.

I can't remember much more than that and it's entirely possible I was missing some type of configuration to make tree-sitter do the same. Unfortunately it looks like I never pushed my playground code for this idea off of my server which is currently packed up as part of a cross country move I'm on the tail end of otherwise I'd get you the code verbatim.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: