feat(loader): add language_for_configuration

This commit is contained in:
Bastiaan Marinus van de Weerd 2024-11-09 17:09:50 -03:00 committed by GitHub
parent 23b03d9f4a
commit 0dc1044d0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -605,6 +605,13 @@ impl Loader {
}
}
pub fn language_for_configuration(
&self,
configuration: &LanguageConfiguration,
) -> Result<Language> {
self.language_for_id(configuration.language_id)
}
fn language_for_id(&self, id: usize) -> Result<Language> {
let (path, language, externals) = &self.languages_by_id[id];
language