engine/source/preprocessorlib/pp_parser.c
/**
 * Gets the next parsable token from the lexer, using a token from a parent
 * lexer if necessary.  This is useful for expanding macros.
 * @param skip_whitespace true to ignore whitespace, false otherwise
 */
Gets the next parsable token from the lexer, using a token from a parent
lexer if necessary.  This is useful for expanding macros.
@param skip_whitespace true to ignore whitespace, false otherwise
Gets the next parsable token from the lexer using a token from a parent lexer if necessary . This is useful for expanding macros . @param skip_whitespace true to ignore whitespace false otherwise
HRESULT pp_parser_lex_token_essential(pp_parser *self, bool skip_whitespace)
{
    pp_parser *parser = self;
    while(1)
    {
        if(FAILED(pp_parser_lex_token(parser, skip_whitespace)))
        {
            return E_FAIL;
        }
        if(parser->token.theType == PP_TOKEN_EOF && parser->parent)
        {
            parser->overread = true;
            parser = parser->parent;
            continue;
        }
        else
        {
            break;
        }
    }
    if(parser != self)
    {
        memcpy(&self->token, &parser->token, sizeof(pp_token));
    }
    return S_OK;
}
HRESULT pp_parser_lex_token_essential ( pp_parser * self , bool skip_whitespace ) { pp_parser * parser = self ; while ( 1 ) { if ( FAILED ( pp_parser_lex_token ( parser , skip_whitespace ) ) ) { return E_FAIL ; } if ( parser -> token . theType == PP_TOKEN_EOF && parser -> parent ) { parser -> overread = true ; parser = parser -> parent ; continue ; } else { break ; } } if ( parser != self ) { memcpy ( & self -> token , & parser -> token , sizeof ( pp_token ) ) ; } return S_OK ; }
Gets the next parsable token from the lexer, using a token from a parent
 lexer if necessary.
Gets the next parsable token from the lexer using a token from a parent lexer if necessary .