Example #1
0
 public ArrayTypeLiteral(AstType objectType, int dimensions)
 {
     if (dimensions <= 0)
     {
         throw new ArgumentOutOfRangeException(nameof(dimensions));
     }
     this.Dimensions  = dimensions;
     this.ElementType = objectType.NotNull();
 }
Example #2
0
 public TypedEnumTypeLiteral(AstType type, IEnumerable <Declaration> items)
 {
     this.Type  = type.NotNull();
     this.Items = items.NotNull().ToArray();
     if (this.Items.Any(i => !i.IsField || i.IsConst || i.IsExported || i.Type != PsiParser.Undefined))
     {
         throw new InvalidOperationException();
     }
 }
Example #3
0
 public ReferenceTypeLiteral(AstType objectType)
 {
     this.ObjectType = objectType.NotNull();
 }