Replies: 2 comments 8 replies
-
Hey @cdietrich, you should be able to override these functions: langium/packages/langium/src/workspace/documents.ts Lines 303 to 311 in c3afb24 They have access to the URI of the file and you can pass in a different set of parser options into the parser based on that URI. Note that you can just call |
Beta Was this translation helpful? Give feedback.
-
The approach we've taken in earlier projects, both with Xtext and with Langium, is to combine all file types in a single entry rule and then add validations that forbid certain elements based on the URI. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
name.<rootindicator>.extension
is there a way to keep just one language and just switch the entry rule of the parser based on the uri and thus avoiding ending up with a big bunch of languageids whilst we otherwise share everything between the languages?
Beta Was this translation helpful? Give feedback.
All reactions