Closed msujew closed 4 weeks ago
Closes https://github.com/eclipse-langium/langium/issues/1505
Note that this approach has a very minor issue in regards to alternatives of lists:
A: (values+=ID* | values+=NUMBER*);
The expected type would be values: Array<string> | Array<number>, but this PR adjusts this to generate values: Array<string | number>. I think this is "good enough" as it fixes the much more common issue of values+=ID values+=NUMBER. See also https://github.com/eclipse-langium/langium-website/pull/132#issuecomment-2117565838.
values: Array<string> | Array<number>
values: Array<string | number>
values+=ID values+=NUMBER
Closes https://github.com/eclipse-langium/langium/issues/1505
Note that this approach has a very minor issue in regards to alternatives of lists:
The expected type would be
values: Array<string> | Array<number>
, but this PR adjusts this to generatevalues: Array<string | number>
. I think this is "good enough" as it fixes the much more common issue ofvalues+=ID values+=NUMBER
. See also https://github.com/eclipse-langium/langium-website/pull/132#issuecomment-2117565838.