Example #1
0
 public virtual string VisitDependentTemplateSpecializationType(
     DependentTemplateSpecializationType template, TypeQualifiers quals)
 {
     if (template.Desugared.Type != null)
     {
         return(template.Desugared.Visit(this));
     }
     return(string.Empty);
 }
Example #2
0
 public DependentTemplateSpecializationType(DependentTemplateSpecializationType type)
     : base(type)
 {
     Arguments = type.Arguments.Select(
         t => new TemplateArgument
     {
         Declaration = t.Declaration,
         Integral    = t.Integral,
         Kind        = t.Kind,
         Type        = new QualifiedType((Type)t.Type.Type.Clone(), t.Type.Qualifiers)
     }).ToList();
     Desugared = new QualifiedType((Type)type.Desugared.Type.Clone(), type.Desugared.Qualifiers);
 }
Example #3
0
        public bool VisitDependentTemplateSpecializationType(
            DependentTemplateSpecializationType template, TypeQualifiers quals)
        {
            if (!VisitType(template, quals))
            {
                return(false);
            }

            if (VisitOptions.VisitTemplateArguments)
            {
                foreach (var arg in template.Arguments)
                {
                    switch (arg.Kind)
                    {
                    case TemplateArgument.ArgumentKind.Type:
                        var type = arg.Type.Type;
                        if (type != null)
                        {
                            type.Visit(this, arg.Type.Qualifiers);
                        }
                        break;

                    case TemplateArgument.ArgumentKind.Declaration:
                        arg.Declaration.Visit(this);
                        break;
                    }
                }
            }

            if (template.Desugared.Type != null)
            {
                return(template.Desugared.Visit(this));
            }

            return(false);
        }