// 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); }
/* 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); }