In the following example, the type.langium is only imported to be used in a reference. The inclusion of all grammar rules from the imported langium grammar in larger examples can lead to massive, difficult to follow railroad diagrams (especially in languages with sprawling references to many other metamodels, which langium deals incredibly well with).
In a dream scenario, an extension to the railroad diagram concept might include references in some more visible way, but at least allowing filtering of unused grammar rules would leave a cleaner (opinionated...) view of the raw syntax.
In the following example, the
type.langium
is only imported to be used in a reference. The inclusion of all grammar rules from the imported langium grammar in larger examples can lead to massive, difficult to follow railroad diagrams (especially in languages with sprawling references to many other metamodels, which langium deals incredibly well with).In a dream scenario, an extension to the railroad diagram concept might include references in some more visible way, but at least allowing filtering of unused grammar rules would leave a cleaner (opinionated...) view of the raw syntax.