Exemplo n.º 1
0
        /// <summary>
        /// Istance a new LanguageList from a directory and load files with specified extension
        /// </summary>
        /// <param name="directory">Directory where search files</param>
        /// <param name="ext">extension of syntax files</param>
        public LanguageList(string directory, string ext)
        {
            string[] files = Directory.GetFiles(directory, ext); //"*.syn");

            foreach (string file in files)
            {
                SyntaxLoader l   = new SyntaxLoader();
                Language     lng = l.Load(file);

                if (!_Languages.ContainsKey(lng.Name))
                {
                    _Languages.Add(lng.Name, lng);
                }
            }
        }
Exemplo n.º 2
0
        public static Language FromSyntaxFile(Stream stream)
        {
            SyntaxLoader sl = new SyntaxLoader();

            return(sl.Load(stream));
        }
Exemplo n.º 3
0
        public static Language FromSyntaxFile(string filename)
        {
            SyntaxLoader sl = new SyntaxLoader();

            return(sl.Load(filename));
        }