compiler/LexTest/AST.cpp
//search for variable in the current method signeture

search for variable in the current method signeture
search for variable in the current method signeture
bool ID_Node::searchMethodSig(list <Variable*> MethodSig,char*name,Variable*& locate)
{
	if (MethodSig.empty())
		return false;
	list<Variable*>::iterator i=MethodSig.begin();
	while (i!=MethodSig.end())
	{
		Variable*u=(Variable*)*i;
		if(strcmp (u->name,name)==0)
		{
			locate=u;
			return true;
		}
		i++;
	}
	return false;
}
bool ID_Node :: searchMethodSig ( list < Variable * > MethodSig , char * name , Variable * & locate ) { if ( MethodSig . empty ( ) ) return false ; list < Variable * > :: iterator i = MethodSig . begin ( ) ; while ( i != MethodSig . end ( ) ) { Variable * u = ( Variable * ) * i ; if ( strcmp ( u -> name , name ) == 0 ) { locate = u ; return true ; } i ++ ; } return false ; }
search for variable in the current method signeture
search for variable in the current method signeture