|
I was wondering if you all have recommendations on how to best copy/reimpement the Langium import logic that is in https://github.com/eclipse-langium/langium/blob/main/packages/langium/src/grammar/internal-grammar-util.ts ? I want to have a similar import structure in my DSL. I followed https://langium.org/docs/recipes/scoping/file-based/ recipe (not the export part) and it works, but I think I need quite a bit more structure that you have in helpers like |
Replies: 1 comment
|
Hey @Kheirlb, I don't have any special recommendation beyond the links you've shared. There might be some room for optimization by caching some data, i.e. if a file already had its includes computed, simply reuse them when resolving transitive imports. In the end, the specific code will always depend on the semantics of your language. |
Hey @Kheirlb,
I don't have any special recommendation beyond the links you've shared. There might be some room for optimization by caching some data, i.e. if a file already had its includes computed, simply reuse them when resolving transitive imports. In the end, the specific code will always depend on the semantics of your language.