public void Register(LanguageDefinition language, params string[] extensions) { foreach (var extension in extensions) { if (!LanguageDefinitions.ContainsKey(extension)) { LanguageDefinitions.Add(extension, language); } } }
public LanguageDefinition GetLanguage(string extension) { LanguageDefinition languageDefinition; if (!LanguageDefinitions.TryGetValue(extension, out languageDefinition)) { languageDefinition = new LanguageDefinition("Null", Lexer.Null); } return(languageDefinition); }