I’ve recently built the SModel crate for Rust for defining the semantic “thingy” in a compiler codebase using inheritance and dynamic dispatch, with additional super.m(...)
calls and #[inheritdoc]
attributes.
So, for anyone on Rust, you may want to use it to structure your hierarchy of things.
Here’s an example of what it generates.