ratmice / nimbleparse_lsp

lsp server for grmtools lex & yacc
Other
7 stars 1 forks source link

basically a rewrite #2

Closed ratmice closed 2 years ago

ratmice commented 2 years ago

Now that we have a working prototype, lets try and get ownership under control and hopefully some sensible types.

Where as before the LSP backend owned the edited file strings, and parser tables. Now we spawn a thread for each parser, that thread now owns both.

This should pave the way for a more readable code base, and allow us to give file modifications priority over reparsing test data. So, if a file modification comes in we can now abandon reparsing.

Another change is that the thread now is created during initialization, and lives throughout the lifetime of the process. Previously there was a thread created on edit, and only lived for the duration of that edit which exited when it had parsed every file.

Now 2 edit operations can both communicate with the same parser thread. Thus giving us priority/cancellation.