Example #1
0
 public void Register(LanguageDefinition language, params string[] extensions)
 {
     foreach (var extension in extensions)
     {
         if (!LanguageDefinitions.ContainsKey(extension))
         {
             LanguageDefinitions.Add(extension, language);
         }
     }
 }
Example #2
0
        public LanguageDefinition GetLanguage(string extension)
        {
            LanguageDefinition languageDefinition;

            if (!LanguageDefinitions.TryGetValue(extension, out languageDefinition))
            {
                languageDefinition = new LanguageDefinition("Null", Lexer.Null);
            }

            return(languageDefinition);
        }