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 |
7 replies
|
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. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
name.<rootindicator>.extensionis 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?
All reactions