예제 #1
0
        public override void ExitNamedType(ExpressParser.NamedTypeContext context)
        {
            string t = null;

            if (context.typeRef() != null)
            {
                t = context.typeRef().SimpleId().GetText();
            }
            else if (context.entityRef() != null)
            {
                t = context.entityRef().SimpleId().GetText();
            }

            if (currTypeData is SimpleType)
            {
                ((SimpleType)currTypeData).WrappedType = t;
            }
            else if (currTypeData is Entity)
            {
                foreach (var ad in currAttrDatas)
                {
                    ad.Type = t;
                }
            }
        }
예제 #2
0
        private string ParseNamedType(ExpressParser.NamedTypeContext context)
        {
            if (context.typeRef() != null)
            {
                return(context.typeRef().SimpleId().GetText());
            }
            else if (context.entityRef() != null)
            {
                return(context.entityRef().SimpleId().GetText());
            }

            return(null);
        }