Replies: 1 comment
-
Hi @dunnry, we are planning on doing something similiar to xcore models, though the idea is still in its early stages. We actually already have a discussion on this in #91, so feel free to discuss anything related to that in there. Keep in mind that JS is a bit more flexible than Java/Xtext and allows to more easily reuse different shapes of objects. E.g. if you want to define the following interface: interface NamedAstNode extends AstNode {
name: string;
} You wouldn't have to declare every AST type to inherit from |
Beta Was this translation helpful? Give feedback.
-
With Xtext, we would end up using something like Xcore to pre-create the shape of the EMF model and then match the Xtext grammar on top of it. We did this when the auto-created EMF model wasn't quite right for what we wanted and we needed to model more advanced scenarios.
What level of control over the AST do we have right now in Langium? It looks like the only input to the AST is the .langium grammar definition (i.e. the Xtext grammar). Is there an Xcore equivalent here or is it not required as the AST auto-generation is better without EMF?
Beta Was this translation helpful? Give feedback.
All reactions