Mime Type
Represents the language and dialect of a source snippet, as an RFC 2046 mime type.
For example, a Kotlin source file may have the mime type text/kotlin. However, if it corresponds to a build.gradle.kts file, we'll also attach the mime parameter role=gradle, resulting in mime type text/kotlin; role=gradle.
For XML resource files, we'll attach other attributes; for example role=manifest for Android manifest files and role=resource for XML resource files. For the latter we may also attach for example folderType=values, and for XML files in general, the root tag, such as text/xml; role=resource; folderType=layout; rootTag=LinearLayout.
This class does not implement all aspects of the RFC; in particular, we don't treat attributes as case-insensitive, and we only support value tokens, not value strings -- neither of these are needed for our purposes.
This is implemented using a value class, such that behind the scenes we're really just passing a String around. This also means we can't initialize related values such as the corresponding Markdown fenced block names, or IntelliJ language id's. Instead, these are looked up via when-tables. When adding a new language, update all lookup methods: