Closed luan-xiaokun closed 2 years ago
Hey @luan-xiaokun,
When the UnionCompositeTypeSpecifier rule is removed
That kind of makes perfect sense, since it's not a legal rule. Our validations don't catch it (yet), but having multiple unassigned rule calls after another don't work as expected (as in: undefined behavior). Something like the following should resolve the issue:
UnionCompositeTypeSpecifier:
'union' '(' specifiers+=TypeSpecifier (',' specificers+=TypeSpecifier)* ')';
Can you try that and see whether that resolves the issue?
It works, thanks for you help!
My complete grammar seems to have many such errors, so it seems that I should spend more time learning the langium grammar.
When run the vscode extension, get the following error
Langium version: 0.4.0
Steps To Reproduce
NOTE: the error disappears when the
UnionCompositeTypeSpecifier
rule is removed.The current behavior
When running the plugin, open the file and write:
then the error shows up, and
myint
is not correctly colored.The expected behavior
When the
UnionCompositeTypeSpecifier
rule is removed,myint
gets correctly colored, and the error disappears.