You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current container type computation does not respect unassigned rule calls and actions when it determines a container relationship. In some cases (like the Keyword type of the grammar language) this leads to a container type that is too strict, i.e. it's missing some possible containers.
If this turns out to be a real problem in practice, we could improve the algorithm with something like this:
Traverse the parser rules looking for assigned rule calls. When we find one of the form A: ... b=B ...; we memorize the container A and go to rule B.
Add container A to the target type and all types mentioned by actions in the current rule.
If the current rule has unassigned rule calls, visit all of them by going to step 2. using the unassigned rule as current rule.
The text was updated successfully, but these errors were encountered:
Langium version: 2.0.0
Package name: langium
See the discussion here: #1055 (comment)
The current container type computation does not respect unassigned rule calls and actions when it determines a container relationship. In some cases (like the
Keyword
type of the grammar language) this leads to a container type that is too strict, i.e. it's missing some possible containers.If this turns out to be a real problem in practice, we could improve the algorithm with something like this:
A: ... b=B ...;
we memorize the containerA
and go to ruleB
.A
to the target type and all types mentioned by actions in the current rule.The text was updated successfully, but these errors were encountered: