sqlparser/sqlparser.cpp
// Get the previous non-blank, non comment token
Get the previous non-blank, non comment token
Get the previous non - blank non comment token
Token* SqlParser::GetPrevToken(Token *token)
{
	if(token == NULL)
		return NULL;
	Token *prev = NULL;
	Token *cur = token->prev;
	while(cur != NULL)
	{
		if(cur->IsBlank() == false && cur->type != TOKEN_COMMENT)
		{
			prev = cur;
			break;
		}
		cur = cur->prev;
	}
	return prev;
}
Token * SqlParser :: GetPrevToken ( Token * token ) { if ( token == NULL ) return NULL ; Token * prev = NULL ; Token * cur = token -> prev ; while ( cur != NULL ) { if ( cur -> IsBlank ( ) == false && cur -> type != TOKEN_COMMENT ) { prev = cur ; break ; } cur = cur -> prev ; } return prev ; }
Get the previous non-blank, non comment token
Get the previous non - blank non comment token