/*************************************************************************** methoddecl.cpp - description ------------------- begin : Thu Mar 20 20:47:51 2003 copyright : (C) 2002 by Cavalli Andrea email : cavalli@bioc.unizh.ch **************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include MethodDecl::~MethodDecl(){ delete id; delete args; delete body; } ZObj * MethodDecl::eval(){ //exec_line done exec_line = line; string name = id->val; vector a; if(args!=NULL){ IdentifierList * l = (IdentifierList*)args; for(int i=0;iident_list.size();i++) a.push_back(l->ident_list[i]->val); } ZMethodDec * f = new ZMethodDec(name,a,body); return f; }