Exemplo n.º 1
0
        public override object VisitClass_declaration([NotNull] NyaParser.Class_declarationContext context)
        {
            string        typeName       = context.identifier().GetText();
            List <string> dependentTypes = new List <string>();

            if (context.types() != null)
            {
                foreach (NyaParser.TypeContext con in context.types().children.OfType <NyaParser.TypeContext>())
                {
                    dependentTypes.Add(con.GetText());
                }
            }

            return(new ClassDescriptor()
            {
                Namespace = _currentNamespace,
                Name = typeName,
                Context = context,
                DependentTypeNames = dependentTypes,
                Type = ClassDescriptor.ClassType.Class,
                Methods = new List <MethodDescriptor>()
            });
        }
Exemplo n.º 2
0
 public override object VisitClass_declaration([NotNull] NyaParser.Class_declarationContext context)
 {
     return(null);
 }