Ejemplo n.º 1
0
 // Formal ---
 // Type t;
 // Id id;
 public void visit(AstFormal n)
 {
     if (currMethod == null)
         throw new SymbolException("currMethod does not exits");
     currMethod.AddParam(n.id, n.t);
 }
Ejemplo n.º 2
0
 /* throws Exception */
 // Formal ---
 // Type t;
 // Id id;
 public void visit(AstFormal n)
 {
     if (null != (n.t as AstObjType)) // make sure type is defined
         symTable.GetClass(((AstObjType) n.t).cid);
 }