sqlparser/sqlparser.cpp
// Get a procedure or function variable token by name
Get a procedure or function variable token by name
Get a procedure or function variable token by name
Token* SqlParser::GetVariable(Token *name)
{
	if(name == NULL || _spl_variables.GetCount() == 0)
		return NULL;
	Token *token = NULL;
	for(ListwItem *i = _spl_variables.GetLast(); i != NULL; i = i->prev)
	{
		if(i->value == (void*)-3)
			continue;
		if(Token::Compare((Token*)i->value, name) == true)
		{
			token = (Token*)i->value;
			break;
		}
	}
	return token;
}
Token * SqlParser :: GetVariable ( Token * name ) { if ( name == NULL || _spl_variables . GetCount ( ) == 0 ) return NULL ; Token * token = NULL ; for ( ListwItem * i = _spl_variables . GetLast ( ) ; i != NULL ; i = i -> prev ) { if ( i -> value == ( void * ) -3 ) continue ; if ( Token :: Compare ( ( Token * ) i -> value , name ) == true ) { token = ( Token * ) i -> value ; break ; } } return token ; }
Get a procedure or function variable token by name
Get a procedure or function variable token by name
// Start from the end of list as the local block variables have priority // Local block boundary