-
Hey everyone, For demonstration purposes I have greatly simplified my grammar to the following:
Possible attribute definitions would therefore be, for example:
In the generated TypeScript,
Is this the desired behavior, and if so, how can I distinguish whether a |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yes, that feature is working as intended, although it might make sense to revise it for terminals. The issue is that language features using the boolean flag assignment feature (i.e. We usually wrap the terminals inside of Expression objects (that can be undefined) for this kind of language feature. See the langium-lox example language. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply, yes in my search I first found the pull request where you discussed the issue for the
Through your tip with langium-lox I was able to adjust the grammar analogously, so that it now works as expected.
|
Beta Was this translation helpful? Give feedback.
Yes, that feature is working as intended, although it might make sense to revise it for terminals. The issue is that language features using the boolean flag assignment feature (i.e.
isExtern?="extern"
) require this auto assignment tofalse
.We usually wrap the terminals inside of Expression objects (that can be undefined) for this kind of language feature. See the langium-lox example language.