示例#1
0
 public MethodRec GetMethod(ClassRec c, AstId mid)
 {
     MethodRec m;
     while (c != null)
     {
         if ((m = c.GetMethod(mid)) != null)
             return m;
         c = c.Parent();
     }
     throw new SymbolException("Method " + mid.s + " not defined");
 }
示例#2
0
 public string UniqueMethodName(ClassRec c, AstId mid)
 {
     MethodRec m;
     while (c != null)
     {
         if ((m = c.GetMethod(mid)) != null)
             return c.Id().s + "_" + mid.s;
         c = c.Parent();
     }
     throw new SymbolException("Method " + mid.s + " not defined");
 }