Nice article! But Langium has a testing API under langium/test. Look at the tests for the Langium grammar language itself to get some inspiration.
If you miss some guides or tutorials how to do things in Langium, I invite you to start an issue or discussion on GitHub or the connected website :-).
I will create one for a testing tutorial. Thanks for making us aware of this.
Research team in software engineering. Modeling & language engineering, advanced testing & DevOps, variability engineering https://www.diverse-team.fr/positions
Thanks a lot!
I was already using langium/test but only parseDocument. parseHelper is a more direct way, and we can get access to fine-grained error at the lexer or parser level thanks to your code snippet!
A more comprehensive tutorial would be nice indeed!
Even better: a set-up working out of the box when testing facilities are generated and integrated into your DSL project... I will launch a discussion about the possibility to have this feature into the langium generator.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice article! But Langium has a testing API under
langium/test
. Look at the tests for the Langium grammar language itself to get some inspiration.If you miss some guides or tutorials how to do things in Langium, I invite you to start an issue or discussion on GitHub or the connected website :-).
I will create one for a testing tutorial. Thanks for making us aware of this.
Thanks a lot!
I was already using
langium/test
but onlyparseDocument
.parseHelper
is a more direct way, and we can get access to fine-grained error at the lexer or parser level thanks to your code snippet!A more comprehensive tutorial would be nice indeed!
Even better: a set-up working out of the box when testing facilities are generated and integrated into your DSL project... I will launch a discussion about the possibility to have this feature into the langium generator.