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

I doubt it's possible to perform proper syntax recovery without messing the result. My approach with usage of some previous valid program state is more reliable and easier to implement.

> AFAIK Zig was designed in such way that, in most cases, you can parse each line independently

It can't be true. Basic stuff like opening/closing braces introduces some global syntax state, so that line-by-line parsing isn't possible. Do you mean something like tokenization instead? It is in many cases possible. But for true LSP it's almost useless.

 help



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

Search: