engine/source/preprocessorlib/pp_parser.c
/**
 * Concatenates two tokens together, implementing the "##" operator.
 * TODO: concatenation still needs work
 * @param token1 the contents of the first token
 * @param token2 the contents of the second token
 */
Concatenates two tokens together, implementing the "##" operator.
TODO: concatenation still needs work
@param token1 the contents of the first token
@param token2 the contents of the second token
Concatenates two tokens together implementing the " ## " operator . TODO : concatenation still needs work @param token1 the contents of the first token @param token2 the contents of the second token
void pp_parser_concatenate(pp_parser *self, const char *token1, const char *token2)
{
    char *output = malloc(strlen(token1) + strlen(token2) + 1);
    pp_parser *outputParser;
    sprintf(output, "%s%s", token1, token2);
    outputParser = pp_parser_alloc(self, self->filename, output, PP_CONCATENATE);
    outputParser->freeSourceCode = true;
}
void pp_parser_concatenate ( pp_parser * self , const char * token1 , const char * token2 ) { char * output = malloc ( strlen ( token1 ) + strlen ( token2 ) + 1 ) ; pp_parser * outputParser ; sprintf ( output , " " , token1 , token2 ) ; outputParser = pp_parser_alloc ( self , self -> filename , output , PP_CONCATENATE ) ; outputParser -> freeSourceCode = true ; }
Concatenates two tokens together, implementing the "##" operator.
Concatenates two tokens together implementing the " ## " operator .