Пример #1
0
        public override object VisitTypeNullable([NotNull] TypeNullableContext context)
        {
            var obj = "";

            obj = Visit(context.typeNotNull()) as string;
            if (context.typeNotNull().GetChild(0) is TypeBasicContext &&
                context.typeNotNull().GetChild(0).GetText() != "obj" &&
                context.typeNotNull().GetChild(0).GetText() != "str")
            {
                obj += "?";
            }
            return(obj);
        }
Пример #2
0
        public override object VisitTypeNullable(TypeNullableContext context)
        {
            var obj = "";

            obj  = ((string)Visit(context.typeNotNull()));
            obj += "?";
            return(obj);
        }