All languages should be homoiconic! In which case, you can easily (meta)program some representation.
And I know it's not exactly what you're describing, but check out ballerina. You can auto-gen sequence diagrams from it (it's "cloud-native" so the assumption is that most of your code can be represented as such)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.