sqlparser/sqlparser.cpp
// Get + or - as operator, not sign and number 
Get + or - as operator, not sign and number
Get + or - as operator not sign and number
Token* SqlParser::GetNextPlusMinusAsOperatorToken(const char ch, const wchar_t wch)
{
	Token *token = GetNextToken();
	if(token == NULL)
		return NULL;
	if(token->Compare(ch, wch) == true)
		return token;
	if(token->Compare(ch, wch, 0) == false)
	{
		PushBack(token);
		return NULL;
	}
	token->type = TOKEN_SYMBOL;
	token->chr = ch;
	token->wchr = 0;
	token->str = NULL;
	token->wstr = NULL;
	_next_start -= token->len - 1;
	_remain_size += token->len - 1;
	token->len = 0;
	token->next_start = _next_start;
	token->remain_size = _remain_size;
	return token;
}
Token * SqlParser :: GetNextPlusMinusAsOperatorToken ( const char ch , const wchar_t wch ) { Token * token = GetNextToken ( ) ; if ( token == NULL ) return NULL ; if ( token -> Compare ( ch , wch ) == true ) return token ; if ( token -> Compare ( ch , wch , 0 ) == false ) { PushBack ( token ) ; return NULL ; } token -> type = TOKEN_SYMBOL ; token -> chr = ch ; token -> wchr = 0 ; token -> str = NULL ; token -> wstr = NULL ; _next_start -= token -> len - 1 ; _remain_size += token -> len - 1 ; token -> len = 0 ; token -> next_start = _next_start ; token -> remain_size = _remain_size ; return token ; }
Get + or - as operator, not sign and number
Get + or - as operator not sign and number
// If + or - already returned as separate token then exit, for example when there is  "+ var" // If a number follows + or - they will be in single token as +1, but check for + or - first // Change the first token to hold operator +/- // Rewind input pointer