예제 #1
0
        public UnionCase(string name, IUnboundDecl valueType, int index)
        {
            if (valueType == null)
            {
                throw new ArgumentNullException("valueType");
            }

            Name      = name;
            ValueType = new Decl(valueType);
            Index     = index;
        }
예제 #2
0
        public FuncType(Position position, IBoundDecl parameter, IBoundDecl returnType)
        {
            if (parameter == null)
            {
                throw new ArgumentNullException("parameter");
            }
            if (returnType == null)
            {
                throw new ArgumentNullException("returnType");
            }

            Position = position;

            Parameter = new Decl(parameter);
            Return    = new Decl(returnType);
        }
예제 #3
0
 public Field(string name, IBoundDecl type, byte index)
     : this(name, index)
 {
     Type = new Decl(type);
 }