// e.g. <T1, T2>
 public override bool Visit(
     UnifiedGenericParameter element, VisitorArgument arg)
 {
     element.Modifiers.TryAccept(this, arg);
     element.Type.TryAccept(this, arg);
     return(false);
 }
Beispiel #2
0
 public override bool Visit(
     UnifiedGenericParameter element, VisitorArgument arg)
 {
     element.Type.TryAccept(this, arg);
     element.Constrains.TryAccept(this, arg.Set(AndDelimiter));
     return(false);
 }
Beispiel #3
0
        public UnifiedElement VisitTypeParameterDeclaration(
            TypeParameterDeclaration dec, object data)
        {
            var type      = UnifiedType.Create(dec.Name);
            var modifiers = null as UnifiedSet <UnifiedModifier>;

            switch (dec.Variance)
            {
            case VarianceModifier.Contravariant:
                modifiers = UnifiedModifier.Create("in").ToSet();
                break;

            case VarianceModifier.Covariant:
                modifiers = UnifiedModifier.Create("out").ToSet();
                break;
            }
            return(UnifiedGenericParameter.Create(
                       type, /*constraint*/ null, modifiers));
        }
 public override bool Visit(
         UnifiedGenericParameter element, VisitorArgument arg)
 {
     element.Modifiers.TryAccept(this, arg);
     element.Type.TryAccept(this, arg);
     element.Constrains.TryAccept(this, arg.Set(AndDelimiter));
     return false;
 }
 //ジェネリックパラメータ : JavaScriptでは出現しない
 public override bool Visit(
         UnifiedGenericParameter element, VisitorArgument arg)
 {
     return false;
 }
 // e.g. <T1, T2>
 public override bool Visit(
     UnifiedGenericParameter element, VisitorArgument arg)
 {
     element.Modifiers.TryAccept(this, arg);
     element.Type.TryAccept(this, arg);
     return false;
 }
Beispiel #7
0
 //ジェネリックパラメータ : JavaScriptでは出現しない
 public override bool Visit(
     UnifiedGenericParameter element, VisitorArgument arg)
 {
     return(false);
 }