if ( *cur == ',' ||
*cur == ';' ||
- *cur == '<' ||
- *cur == '>' ||
- *cur == '=' ||
*cur == ')' ||
*cur == '('
)
return;
}
+ // special case of "!=", "<=", ... 2 character composite tokens
+ if ( *cur == '<' ||
+ *cur == '>' ||
+ *cur == '=' ||
+ *cur == '!'
+ )
+ {
+ cur++;
+ if ( *cur == '=' )
+ cur++;
+
+ return;
+ }
+
++cur; // leading character is always skipped
for( ; cur < _gSrcEnd ; ++cur )
pOp->mName = get_token_str( cur );
+ // checker whether it's not an operator
+ char chFirst = *pOp->mName.c_str();
+ if ( !isalpha(chFirst) && chFirst != '_' && chFirst != '~' )
+ {
+ // skip 'operator'
+ skip_next_token_back( cur );
+ skip_token_back( cur );
+
+ string lastToken = get_token_str( cur );
+ if ( lastToken == "operator" )
+ {
+ lastToken += pOp->mName;
+ pOp->mName = lastToken;
+ }
+ else
+ {
+ // ok, it wasn't an operator after all
+ skip_token( cur );
+ }
+ }
+
// go backwards to method return type
skip_next_token_back( cur );
if ( blocksSkipped == 1 )
{
// check if the empty arg. list stressed with "void" inside
- if ( cmp_tokens_fast( blocks[0] , "void", 4 ) )
- return TRUE;
+ if ( cmp_tokens_fast( blocks[0] , "void", 4 ) )
+ {
+ cur++; // skip ')'
+
+ break;
+ }
// FIXME:: TBD:: K&R-style function declarations!