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

search for variable in the current method
search for variable in the current method
bool ID_Node::searchMethod(Method*currMethod,char*name,Variable*& locate)
{
	Variable* tmp='\0';
	if (searchMethodLocal(currMethod->Local,name,tmp))
	{
		locate=tmp;
		return true;
	}
	else if (searchMethodSig(currMethod->parameters,name,tmp))
	{
		locate=tmp;
		return true;
	}
	else return false;
}
bool ID_Node :: searchMethod ( Method * currMethod , char * name , Variable * & locate ) { Variable * tmp = ' \0 ' ; if ( searchMethodLocal ( currMethod -> Local , name , tmp ) ) { locate = tmp ; return true ; } else if ( searchMethodSig ( currMethod -> parameters , name , tmp ) ) { locate = tmp ; return true ; } else return false ; }
search for variable in the current method
search for variable in the current method