Skip to content
Discussion options

You must be logged in to vote

Hey @haukepribnow,

these are some good ideas. I would personally go with (1) usually, since it has the added benefit of being able to provide users with the actual type definitions, so they have a way of looking up what the types are that they're working with. See also this guide on builtin libraries.

(2) and (3) are mostly the same, in the sense that they simply enrich the scope with purely virtual objects that don't actually exist in documents. You would still need to declare interfaces for these types though in the Langium grammar, even if they don't have an implementing parser rule. See our documentation on declared types. You can then create instances of these interfaces in memory ba…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@haukepribnow
Comment options

Answer selected by haukepribnow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants