Advice for Language Servers using parsers written in C++ #9632
-
Hi All, We are in the process of using our own Fortran parser present in lfortran, written in C++, as the backend of a new Language Server and I was wondering if you could share some of your expertise or at least provide some comments. Basically, implementing the LSP interface in C++, even if that is only for the server, would be a nightmare to maintain and currently there is not enough manpower to support this. So we are looking for better solutions to communicate our AST/ASR objects into Typescript. nbind, looked like a good solution but the project appears to be dead. Do you have any recommendations with regards to this? I know that your C++ LSs are proprietary and you are limited to what you are allowed to share. If it would be preferable we can continue this conversation in private. Thanks in advance for any and all help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
TypeScript to LSP server communication could be done with any JSON serialization library and doesn't require RPCs. Our AST isn't sent to TypeScript -- if that's what you're trying to do then we don't have any advice on that. Our LSP server just reads the JSON messages and returns JSON results. The LSP is versioned so you can stay on an older version unless you need a newer one for a particular feature so I'm not sure what maintenance nightmare you're referring to. |
Beta Was this translation helpful? Give feedback.
TypeScript to LSP server communication could be done with any JSON serialization library and doesn't require RPCs. Our AST isn't sent to TypeScript -- if that's what you're trying to do then we don't have any advice on that. Our LSP server just reads the JSON messages and returns JSON results. The LSP is versioned so you can stay on an older version unless you need a newer one for a particular feature so I'm not sure what maintenance nightmare you're referring to.