Example #1
0
        private TypeInfo CreateEnumerationType(EnumerationDataType enumerationType)
        {
            //here enumeration has the same name as it's defining type (there will be duplication)
            //not sure this is the right approach. Doesn't it get messy with extensions?
            var typeInfo = new EnumerationTypeInfo(CurrentDeclaringSymbol);

            if (enumerationType.BasedOn != null)
            {
                throw new NotImplementedException();
            }

            if (enumerationType.IsExtensible)
            {
                throw new NotImplementedException();
            }

            foreach (var item in enumerationType.Items)
            {
                var info = new EnumerationInfo(item.Name, typeInfo);

                symbols_.Add(item, info);

                typeInfo.AddEnumeration(info);
            }

            return(typeInfo);
        }
Example #2
0
 public virtual void VisitEnumerationDataType(EnumerationDataType enumerationDataType)
 {
     DefaultVisit(enumerationDataType);
 }