public static Symbol Parse(XmlNode node) { Symbol symbol = new Symbol(); foreach (XmlAttribute attr in node.Attributes) { symbol.SetProperty(attr.Name, attr.Value); } return symbol; }
/// <summary> /// Helps to detect duplicate symbols, for example. /// </summary> /// <param name="className"></param> public void AddClassSymbol(Symbol symbol ) { if (m_symbols.ContainsKey( symbol.Name)) { throw new Exceptions.CompileException("Duplicate class name: {0}", symbol.Name); } if (m_symbols.ContainsKey(symbol.FullClassName)) { throw new Exceptions.CompileException("Duplicate full class name: {0}", symbol.FullClassName); } //if ( (fullBaseClass != null) && !m_symbols.ContainsKey(fullBaseClass)) //{ // throw new Exceptions.CompileException("Unknown base class: {0}", fullBaseClass); //} m_symbols.Add(symbol.Name, symbol); #if OLD_WAY Assembly assembly = Assembly.Load( new AssemblyName( "xgc3.Generated")); // Get all Types available in the assembly in an array Type[] typeArray = assembly.GetTypes (); Type t=typeArray[className]; t.FullName, t.BaseType #endif }