Beispiel #1
0
 public TypeNode ApplySignature(TypeNode type) {
   foreach (var sig in this.signature)
     switch (sig) {
       case ByRefSignature:
         type = type.GetReferenceType();
         break;
       case PointerSignature:
         type = type.GetPointerType();
         break;
       case SzArraySignature:
         type = type.GetArrayType(1);
         break;
       default:
         type = type.GetArrayType(sig, true);
         break;
     }
   return type;
 }
Beispiel #2
0
 public ConstructArray(TypeNode elementType, int rank, ExpressionList initializers)
     : base(null, NodeType.ConstructArray)
 {
     this.elementType = elementType;
     this.Initializers = initializers;
     this.rank = rank;
     if(elementType != null)
         this.Type = elementType.GetArrayType(1);
 }