engine/source/preprocessorlib/pp_parser.c
/**
 * Returns the type of the next non-whitespace token in the lexer's stream
 * without permanently changing the state of the parser or its lexer, or -1 if
 * there is a lexical error.
 */
Returns the type of the next non-whitespace token in the lexer's stream
without permanently changing the state of the parser or its lexer, or -1 if
there is a lexical error.
Returns the type of the next non - whitespace token in the lexer ' s stream without permanently changing the state of the parser or its lexer or - 1 if there is a lexical error .
int pp_parser_peek_token(pp_parser *self)
{
    pp_lexer lexer;
    pp_token token;
    memcpy(&lexer, &self->lexer, sizeof(pp_lexer));
    while(1)
    {
        if(FAILED(pp_lexer_GetNextToken(&self->lexer, &token)))
        {
            memcpy(&self->lexer, &lexer, sizeof(pp_lexer));
            return -1;
        }
        if(token.theType != PP_TOKEN_WHITESPACE)
        {
            break;
        }
    }
    memcpy(&self->lexer, &lexer, sizeof(pp_lexer));
    return token.theType;
}
int pp_parser_peek_token ( pp_parser * self ) { pp_lexer lexer ; pp_token token ; memcpy ( & lexer , & self -> lexer , sizeof ( pp_lexer ) ) ; while ( 1 ) { if ( FAILED ( pp_lexer_GetNextToken ( & self -> lexer , & token ) ) ) { memcpy ( & self -> lexer , & lexer , sizeof ( pp_lexer ) ) ; return -1 ; } if ( token . theType != PP_TOKEN_WHITESPACE ) { break ; } } memcpy ( & self -> lexer , & lexer , sizeof ( pp_lexer ) ) ; return token . theType ; }
Returns the type of the next non-whitespace token in the lexer's stream
 without permanently changing the state of the parser or its lexer, or -1 if
 there is a lexical error.
Returns the type of the next non - whitespace token in the lexer ' s stream without permanently changing the state of the parser or its lexer or - 1 if there is a lexical error .