Direct Chevrotain Usage #412
Replies: 1 comment 5 replies
-
Hi @kevinkhill, so in Langium almost all functionality is build on the existence of your abstract grammar reprentation. Using this information, it is able build all the LSP features on top (looking for references, code completion, semantic highlighting, etc.) and perform AST construction. So you'll definitely have to replace your parser with the grammar representation provided by Langium. Looking at your interpreter, as far as I can see, it works on the CST directly. While this approach is also feasible in Langium (we expose a CST in a similiar manner as Chevrotain does), computation/interpretation/code generation is usually performed on the AST. So in total, reusing the code that builds on the parser implementation will probably not be possible given Langium's general architecture. |
Beta Was this translation helpful? Give feedback.
-
Hello, I'd like to start the discussion if possible, for directly using Chevrotain in this project.
What I mean is, I found Chevrotain first and have a partial working interpreter, so is it possible to plug my working project into Langium and skip over the "learning Langium" part?
I am leaning towards a no answer, but I thought I'd ask
Beta Was this translation helpful? Give feedback.
All reactions