Пример #1
0
        public Ust VisitTypeType(JavaParser.TypeTypeContext context)
        {
            if (context.classOrInterfaceType() != null)
            {
                return(Visit(context.classOrInterfaceType()));
            }

            return(Visit(context.primitiveType()));
        }
Пример #2
0
        public override void EnterTypeType(JavaParser.TypeTypeContext context)
        {
            if (context.annotation() != null)
            {
                AnnotationListener annotationListener = new AnnotationListener();
                context.annotation().EnterRule(annotationListener);
                QualifiedName = annotationListener.QualifiedName;
            }

            if (context.classOrInterfaceType() != null)
            {
                ClassOrInterfaceTypeListener classOrInterfaceTypeListener =
                    new ClassOrInterfaceTypeListener();
                context.classOrInterfaceType().EnterRule(classOrInterfaceTypeListener);
                ID = classOrInterfaceTypeListener.id;
            }

            if (context.primitiveType() != null)
            {
                PrimitiveTypeListener primitiveTypeListener = new PrimitiveTypeListener();
                context.primitiveType().EnterRule(primitiveTypeListener);
                PrimitiveTypeName = primitiveTypeListener.PrimitiveTypeName;
            }
        }