Exemple #1
0
 public MemberDescriptor(CFlatType type, string name, ClassDescriptor cls)
     : base(type)
 {
     Modifiers       = new List <string>();
     Name            = name;
     ContainingClass = cls;
 }
Exemple #2
0
 /// <summary>
 /// Takes a type and the index in the function of a parameter
 /// </summary>
 public ActualDescriptor(CFlatType type, string modifier = null, string name = null)
     : base(type)
 {
     Type     = type;
     Modifier = modifier;
     Name     = name;
 }
Exemple #3
0
        public virtual bool IsSupertype(CFlatType checkType)
        {
            /* This method should never return a value itself, but rather call the appropriate overload for the
             *  concrete type of checkType */
            dynamic realType = checkType;

            return(this.IsSupertype(realType));
        }
Exemple #4
0
 public MethodDescriptor(CFlatType t, string name, ClassDescriptor cls) : base(t)
 {
     IsCompleted     = false;
     Modifiers       = new List <string>();
     Formals         = new List <FormalDescriptor>();
     Name            = name;
     ContainingClass = cls;
 }
Exemple #5
0
 public ArrayDescriptor(CFlatType type, CFlatType baseType, string name, int lower, int upper)
     : base(type)
 {
     Type       = type;
     BaseType   = baseType;
     Name       = name;
     LowerBound = lower;
     UpperBound = upper;
 }
Exemple #6
0
 public ClassDescriptor(CFlatType t, ClassDescriptor parentClass, string name, Scope s)
     : base(t)
 {
     ParentClass = parentClass;
     Methods     = new List <MethodDescriptor>();
     Fields      = new List <MemberDescriptor>();
     Name        = name;
     Scope       = s;
 }
Exemple #7
0
 public bool IsSubtypeOf(CFlatType t)
 {
     return(t.IsSupertype(this));
 }
Exemple #8
0
 public LocalDescriptor(CFlatType type, string name)
     : base(type)
 {
     Name = name;
 }
Exemple #9
0
 public TypeArray(CFlatType baseType)
 {
     _baseType = baseType;
 }
Exemple #10
0
 /// <summary>
 /// Takes a type and the index in the function of a parameter
 /// </summary>
 public FormalDescriptor(CFlatType type, string name, string modifier)
     : base(type)
 {
     Name     = name;
     Modifier = modifier;
 }
Exemple #11
0
 public void AddMethod(string name, CFlatType type)
 {
     Methods.Add(name, type);
 }
Exemple #12
0
 public void AddField(string name, CFlatType type)
 {
     Fields.Add(name, type);
 }
Exemple #13
0
 public void AddLocal(string name, CFlatType type)
 {
     _locals.Add(name, type);
 }
Exemple #14
0
 public void AddLocal(string name, CFlatType type)
 {
     CurrentBlock.AddLocal(name, type);
 }
Exemple #15
0
 public void AddFormal(string name, CFlatType type)
 {
     Formals.Add(name, type);
 }
Exemple #16
0
 public Descriptor(CFlatType t)
 {
     this.Type = t;
 }