public ArrayTypeLiteral(AstType objectType, int dimensions) { if (dimensions <= 0) { throw new ArgumentOutOfRangeException(nameof(dimensions)); } this.Dimensions = dimensions; this.ElementType = objectType.NotNull(); }
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(); } }
public ReferenceTypeLiteral(AstType objectType) { this.ObjectType = objectType.NotNull(); }