protected InternalMethod(string name, InternalType returnType, Dictionary<string, InternalType> formals)
 {
     Name = name;
     FuncInfo = new TypeFunction(name)
     {
         ReturnType = returnType,
         Formals = formals
     };
 }
Exemplo n.º 2
0
 public override bool IsSupertype(TypeFunction checkType)
 {
     return(true);
 }
Exemplo n.º 3
0
 public virtual bool IsSupertype(TypeFunction checkType)
 {
     return(false);
 }
Exemplo n.º 4
0
 private void AddCtorIfNone(Scope classScope, string name)
 {
     var ctor = _currentClass.Descriptor.Methods.SingleOrDefault(p => p.Name.Equals(_currentClass.ClassName, StringComparison.OrdinalIgnoreCase));
     if (ctor == null)
     {
         var func = new TypeFunction(name) { ReturnType = new TypeVoid(), IsConstructor = true, Scope = classScope };
         _mgr.AddMethod(name, func, _currentClass);
     }
 }
 public virtual bool IsSupertype(TypeFunction checkType)
 {
     return false;
 }
Exemplo n.º 6
0
 private Type[] ArgumentTypes(TypeFunction f)
 {
     return f.Formals.Values.Select(LookupCilType).ToArray();
 }
Exemplo n.º 7
0
 public override bool IsSupertype(TypeFunction checkType)
 {
     return true;
 }
Exemplo n.º 8
0
 public override bool IsSupertype(TypeFunction checkType)
 {
     throw new NotImplementedException();
 }